Skip to content

Commit 8eceb82

Browse files
committed
TST: Fix condition for test_tmpconfigdir_warning
This checks `os.geteuid`, but this is only available on Unix, not Emscripten or WASM.
1 parent a866298 commit 8eceb82

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/tests/test_matplotlib.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ def test_parse_to_version_info(version_str, version_tuple):
1919
assert matplotlib._parse_to_version_info(version_str) == version_tuple
2020

2121

22-
@pytest.mark.skipif(sys.platform == "win32",
23-
reason="chmod() doesn't work as is on Windows")
24-
@pytest.mark.skipif(sys.platform != "win32" and os.geteuid() == 0,
22+
@pytest.mark.skipif(sys.platform not in ["linux", "darwin"],
23+
reason="chmod() doesn't work on this platform")
24+
@pytest.mark.skipif(sys.platform in ["linux", "darwin"] and os.geteuid() == 0,
2525
reason="chmod() doesn't work as root")
2626
def test_tmpconfigdir_warning(tmp_path):
2727
"""Test that a warning is emitted if a temporary configdir must be used."""

0 commit comments

Comments
 (0)