island: use constants for permissions mode in test_file_utils.py
This commit is contained in:
parent
8b2c3ef8a3
commit
6b4a0906c0
|
@ -70,7 +70,11 @@ def test_create_secure_directory__no_parent_dir(test_path_nested):
|
|||
def test_create_secure_directory__perm_linux(test_path):
|
||||
create_secure_directory(test_path)
|
||||
st = os.stat(test_path)
|
||||
assert (st.st_mode & 0o777) == stat.S_IRWXU
|
||||
|
||||
expected_mode = stat.S_IRWXU
|
||||
actual_mode = st.st_mode & (stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)
|
||||
|
||||
assert expected_mode == actual_mode
|
||||
|
||||
|
||||
@pytest.mark.skipif(not is_windows_os(), reason="Tests Windows (not Posix) permissions.")
|
||||
|
|
Loading…
Reference in New Issue