/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: Alexander Belchenko
  • Date: 2007-11-06 07:30:29 UTC
  • mfrom: (2968 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2971.
  • Revision ID: bialix@ukr.net-20071106073029-h4gqz55szi1motes
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
2619
2619
        if sys.platform == 'win32' and e.errno == errno.EACCES:
2620
2620
            sys.stderr.write(('Permission denied: '
2621
2621
                                 'unable to remove testing dir '
2622
 
                                 '%\n' % os.path.basename(dirname)))
 
2622
                                 '%s\n' % os.path.basename(dirname)))
2623
2623
        else:
2624
2624
            raise
2625
2625
 
2663
2663
SymlinkFeature = _SymlinkFeature()
2664
2664
 
2665
2665
 
 
2666
class _OsFifoFeature(Feature):
 
2667
 
 
2668
    def _probe(self):
 
2669
        return getattr(os, 'mkfifo', None)
 
2670
 
 
2671
    def feature_name(self):
 
2672
        return 'filesystem fifos'
 
2673
 
 
2674
OsFifoFeature = _OsFifoFeature()
 
2675
 
 
2676
 
2666
2677
class TestScenarioApplier(object):
2667
2678
    """A tool to apply scenarios to tests."""
2668
2679
 
2723
2734
        except UnicodeDecodeError:
2724
2735
            return char
2725
2736
    return None
 
2737
 
 
2738
 
 
2739
class _FTPServerFeature(Feature):
 
2740
    """Some tests want an FTP Server, check if one is available.
 
2741
 
 
2742
    Right now, the only way this is available is if 'medusa' is installed.
 
2743
    http://www.amk.ca/python/code/medusa.html
 
2744
    """
 
2745
 
 
2746
    def _probe(self):
 
2747
        try:
 
2748
            import bzrlib.tests.ftp_server
 
2749
            return True
 
2750
        except ImportError:
 
2751
            return False
 
2752
 
 
2753
    def feature_name(self):
 
2754
        return 'FTPServer'
 
2755
 
 
2756
FTPServerFeature = _FTPServerFeature()