def test_create_dirs_with_mode(self): with namedTemporaryDir() as base: path = os.path.join(base, "a", "b") mode = 0o700 fileUtils.createdir(path, mode=mode) self.assertTrue(os.path.isdir(path)) while path != base: pathmode = stat.S_IMODE(os.lstat(path).st_mode) self.assertEqual(pathmode, mode) path = os.path.dirname(path)
def test_directory_exists_no_mode(self): with namedTemporaryDir() as base: fileUtils.createdir(base)
def test_create_dirs_no_mode(self): with namedTemporaryDir() as base: path = os.path.join(base, "a", "b") self.assertFalse(os.path.isdir(path)) fileUtils.createdir(path) self.assertTrue(os.path.isdir(path))