~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test__walkdirs_win32.py

  • Committer: John Arbash Meinel
  • Date: 2010-02-17 17:11:16 UTC
  • mfrom: (4797.2.17 2.1)
  • mto: (4797.2.18 2.1)
  • mto: This revision was merged to the branch mainline in revision 5055.
  • Revision ID: john@arbash-meinel.com-20100217171116-h7t9223ystbnx5h8
merge bzr.2.1 in preparation for NEWS entry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008 Canonical Ltd
 
1
# Copyright (C) 2008, 2009, 2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
24
24
    )
25
25
 
26
26
 
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()
 
27
win32_readdir_feature = tests.ModuleAvailableFeature('bzrlib._walkdirs_win32')
41
28
 
42
29
 
43
30
class TestWin32Finder(tests.TestCaseInTempDir):
44
31
 
45
 
    _test_needs_features = [Win32ReadDirFeature]
 
32
    _test_needs_features = [win32_readdir_feature]
46
33
 
47
34
    def setUp(self):
48
35
        super(TestWin32Finder, self).setUp()