This commit is contained in:
Ryan Addessi 2023-09-27 00:15:28 -06:00 committed by Pedro Algarvio
parent 7bc016f9fd
commit 12ff4bf963

View file

@ -141,19 +141,19 @@ def test_directory_children_only(file, tmp_path):
assert ret.result is True
# Assert parent directory's mode remains unchanged
assert oct(name.stat().st_mode)[-3:] == "700", (
f"Expected mode 700 for {name}, got {oct(name.stat().st_mode)[-3:]}"
)
assert (
oct(name.stat().st_mode)[-3:] == "700"
), f"Expected mode 700 for {name}, got {oct(name.stat().st_mode)[-3:]}"
# Assert child file's mode is changed
assert oct(strayfile.stat().st_mode)[-3:] == "644", (
f"Expected mode 644 for {strayfile}, got {oct(strayfile.stat().st_mode)[-3:]}"
)
assert (
oct(strayfile.stat().st_mode)[-3:] == "644"
), f"Expected mode 644 for {strayfile}, got {oct(strayfile.stat().st_mode)[-3:]}"
# Assert child directory's mode is changed
assert oct(straydir.stat().st_mode)[-3:] == "755", (
f"Expected mode 755 for {straydir}, got {oct(straydir.stat().st_mode)[-3:]}"
)
assert (
oct(straydir.stat().st_mode)[-3:] == "755"
), f"Expected mode 755 for {straydir}, got {oct(straydir.stat().st_mode)[-3:]}"
def test_directory_clean(file, tmp_path):