~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test__walkdirs_win32.py

  • Committer: Patch Queue Manager
  • Date: 2015-09-30 16:43:21 UTC
  • mfrom: (6603.2.2 fix-keep-dirty)
  • Revision ID: pqm@pqm.ubuntu.com-20150930164321-ct2v2qnmvimqt8qf
(vila) Avoid associating dirty patch headers with the previous file in the
 patch. (Colin Watson)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
    osutils,
23
23
    tests,
24
24
    )
25
 
 
26
 
 
27
 
win32_readdir_feature = tests.ModuleAvailableFeature('bzrlib._walkdirs_win32')
 
25
from bzrlib.tests import (
 
26
    features,
 
27
    )
 
28
 
 
29
 
 
30
win32_readdir_feature = features.ModuleAvailableFeature('bzrlib._walkdirs_win32')
28
31
 
29
32
 
30
33
class TestWin32Finder(tests.TestCaseInTempDir):
93
96
        self.assertEqual(errno.ENOENT, e.errno)
94
97
        self.assertEqual(3, e.winerror)
95
98
        self.assertEqual((3, u'no_such_dir/*'), e.args)
 
99
 
 
100
 
 
101
class Test_Win32Stat(tests.TestCaseInTempDir):
 
102
 
 
103
    _test_needs_features = [win32_readdir_feature]
 
104
 
 
105
    def setUp(self):
 
106
        super(Test_Win32Stat, self).setUp()
 
107
        from bzrlib._walkdirs_win32 import lstat
 
108
        self.win32_lstat = lstat
 
109
 
 
110
    def test_zero_members_present(self):
 
111
        self.build_tree(['foo'])
 
112
        st = self.win32_lstat('foo')
 
113
        # we only want to ensure that some members are present
 
114
        self.assertEqual(0, st.st_dev)
 
115
        self.assertEqual(0, st.st_ino)
 
116
        self.assertEqual(0, st.st_uid)
 
117
        self.assertEqual(0, st.st_gid)