/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: Canonical.com Patch Queue Manager
  • Date: 2007-10-31 10:40:53 UTC
  • mfrom: (2952.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20071031104053-fj7i7m8037qjgce4
Fix #157752 by wrapping medusa test ftp server behind FTPServerFeature

Show diffs side-by-side

added added

removed removed

Lines of Context:
2723
2723
        except UnicodeDecodeError:
2724
2724
            return char
2725
2725
    return None
 
2726
 
 
2727
 
 
2728
class _FTPServerFeature(Feature):
 
2729
    """Some tests want an FTP Server, check if one is available.
 
2730
 
 
2731
    Right now, the only way this is available is if 'medusa' is installed.
 
2732
    http://www.amk.ca/python/code/medusa.html
 
2733
    """
 
2734
 
 
2735
    def _probe(self):
 
2736
        try:
 
2737
            import bzrlib.tests.FTPServer
 
2738
            return True
 
2739
        except ImportError:
 
2740
            return False
 
2741
 
 
2742
    def feature_name(self):
 
2743
        return 'FTPServer'
 
2744
 
 
2745
FTPServerFeature = _FTPServerFeature()