correction test case

This commit is contained in:
agnewee 2017-12-23 17:37:29 +08:00
parent e6e7be1579
commit 777fb61847
1 changed files with 2 additions and 3 deletions

View File

@ -368,8 +368,7 @@ class TestChmod:
tempfile.mkstemp(dir=t_dir) tempfile.mkstemp(dir=t_dir)
chmod(t_dir, 755) chmod(t_dir, 755)
for root, _, files in os.walk(t_dir): for root, _, files in os.walk(t_dir):
root_path = os.path.abspath(root) assert oct(os.stat(root).st_mode)[-3:] == '755'
assert oct(os.stat(root_path).st_mode)[-3:0] == '755'
for file_ in files: for file_ in files:
assert oct(os.stat(os.path.join(root_path, file_)).st_mode)[-3:0] == '755' assert oct(os.stat(os.path.join(root, file_)).st_mode)[-3:] == '755'