Fix file_util test of make_dirs_with_absolute_mode

3 directory levels deep is sufficient for this test
This commit is contained in:
David Stainton 2016-02-15 13:19:03 +01:00
parent c7397f0066
commit cf039664c0
1 changed files with 1 additions and 3 deletions

View File

@ -601,9 +601,7 @@ class FileUtil(ReallyEqualMixin, unittest.TestCase):
def test_make_dirs_with_absolute_mode(self):
workdir = u"test_make_dirs_with_absolute_mode"
fileutil.make_dirs(workdir)
fileutil.make_dirs_with_absolute_mode(workdir, os.path.join(workdir,"a/b/c/d"), 0766)
new_mode = os.stat(os.path.join(workdir,"a/b/c/d")).st_mode & 0777
self.failUnlessEqual(new_mode, 0766)
fileutil.make_dirs_with_absolute_mode(workdir, os.path.join(workdir,"a/b/c"), 0766)
new_mode = os.stat(os.path.join(workdir,"a/b/c")).st_mode & 0777
self.failUnlessEqual(new_mode, 0766)
new_mode = os.stat(os.path.join(workdir,"a/b")).st_mode & 0777