Skip to content

Commit ce53f0d

Browse files
committed
tests: config: Split the skip cases
Have the actual reason for skipping the test in the output. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent 76890ef commit ce53f0d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_config.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,9 +703,10 @@ def test_config_precedence():
703703
assert cfg(f=LOCAL)['pytest']['precedence'] == 'local'
704704

705705

706+
@pytest.mark.skipif(WINDOWS, reason="Non-readable files do not exist on Windows")
706707
@pytest.mark.skipif(
707-
WINDOWS or (os.geteuid() == 0),
708-
reason="Non-readable files do not exist on Windows, and root user can always read files",
708+
hasattr(os, "geteuid") and os.geteuid() == 0,
709+
reason="root user can always read files",
709710
)
710711
def test_config_non_readable_file(config_tmpdir):
711712
# test to read a config file without read permission

0 commit comments

Comments
 (0)