~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test__walkdirs_win32.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-11-17 03:20:35 UTC
  • mfrom: (4792.4.3 456036)
  • Revision ID: pqm@pqm.ubuntu.com-20091117032035-s3sgtlixj1lrminn
(Gordon Tyler) Fix IndexError during 'bzr ignore /' (#456036)

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
    )
25
25
 
26
26
 
27
 
win32_readdir_feature = tests.ModuleAvailableFeature('bzrlib._walkdirs_win32')
 
27
class _Win32ReadDirFeature(tests.Feature):
 
28
 
 
29
    def _probe(self):
 
30
        try:
 
31
            import bzrlib._walkdirs_win32
 
32
        except ImportError:
 
33
            return False
 
34
        else:
 
35
            return True
 
36
 
 
37
    def feature_name(self):
 
38
        return 'bzrlib._Win32ReadDir'
 
39
 
 
40
Win32ReadDirFeature = _Win32ReadDirFeature()
28
41
 
29
42
 
30
43
class TestWin32Finder(tests.TestCaseInTempDir):
31
44
 
32
 
    _test_needs_features = [win32_readdir_feature]
 
45
    _test_needs_features = [Win32ReadDirFeature]
33
46
 
34
47
    def setUp(self):
35
48
        super(TestWin32Finder, self).setUp()