Skip to content

Commit affeb83

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 affeb83

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/test_config.py

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

705705

706-
@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",
709-
)
706+
@pytest.mark.skipif(WINDOWS, reason="Non-readable files do not exist on Windows")
707+
@pytest.mark.skipif(os.geteuid() == 0, reason="root user can always read files",)
710708
def test_config_non_readable_file(config_tmpdir):
711709
# test to read a config file without read permission
712710
cwd = pathlib.Path.cwd()

0 commit comments

Comments
 (0)