Skip to content

Commit ee98981

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 8ef71ee commit ee98981

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
@@ -18,9 +18,9 @@ def test_parse_to_version_info(version_str, version_tuple):
1818
assert matplotlib._parse_to_version_info(version_str) == version_tuple
1919

2020

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

0 commit comments

Comments
 (0)