/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: John Arbash Meinel
  • Date: 2007-11-16 01:39:55 UTC
  • mfrom: (2998 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3003.
  • Revision ID: john@arbash-meinel.com-20071116013955-3zy651u2crhk31xx
[merge] bzr.dev 2998

Show diffs side-by-side

added added

removed removed

Lines of Context:
2429
2429
                   'bzrlib.tests.test_lockable_files',
2430
2430
                   'bzrlib.tests.test_log',
2431
2431
                   'bzrlib.tests.test_lsprof',
 
2432
                   'bzrlib.tests.test_lru_cache',
2432
2433
                   'bzrlib.tests.test_mail_client',
2433
2434
                   'bzrlib.tests.test_memorytree',
2434
2435
                   'bzrlib.tests.test_merge',
2663
2664
SymlinkFeature = _SymlinkFeature()
2664
2665
 
2665
2666
 
 
2667
class _OsFifoFeature(Feature):
 
2668
 
 
2669
    def _probe(self):
 
2670
        return getattr(os, 'mkfifo', None)
 
2671
 
 
2672
    def feature_name(self):
 
2673
        return 'filesystem fifos'
 
2674
 
 
2675
OsFifoFeature = _OsFifoFeature()
 
2676
 
 
2677
 
2666
2678
class TestScenarioApplier(object):
2667
2679
    """A tool to apply scenarios to tests."""
2668
2680
 
2723
2735
        except UnicodeDecodeError:
2724
2736
            return char
2725
2737
    return None
 
2738
 
 
2739
 
 
2740
class _FTPServerFeature(Feature):
 
2741
    """Some tests want an FTP Server, check if one is available.
 
2742
 
 
2743
    Right now, the only way this is available is if 'medusa' is installed.
 
2744
    http://www.amk.ca/python/code/medusa.html
 
2745
    """
 
2746
 
 
2747
    def _probe(self):
 
2748
        try:
 
2749
            import bzrlib.tests.ftp_server
 
2750
            return True
 
2751
        except ImportError:
 
2752
            return False
 
2753
 
 
2754
    def feature_name(self):
 
2755
        return 'FTPServer'
 
2756
 
 
2757
FTPServerFeature = _FTPServerFeature()