From ffc9f1d164be0318a06c1459c647b27e7567f1a3 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 11 Jun 2020 17:02:20 -0400 Subject: [PATCH] Skip test_tmpconfigdir_warning when running as root. This is something that happens when building wheels in the manylinux1 container. --- lib/matplotlib/tests/test_matplotlib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/matplotlib/tests/test_matplotlib.py b/lib/matplotlib/tests/test_matplotlib.py index 8bbbd2cff806..200bcaef1e02 100644 --- a/lib/matplotlib/tests/test_matplotlib.py +++ b/lib/matplotlib/tests/test_matplotlib.py @@ -9,6 +9,8 @@ @pytest.mark.skipif( os.name == "nt", reason="chmod() doesn't work as is on Windows") +@pytest.mark.skipif(os.name != "nt" and os.geteuid() == 0, + reason="chmod() doesn't work as root") def test_tmpconfigdir_warning(tmpdir): """Test that a warning is emitted if a temporary configdir must be used.""" mode = os.stat(tmpdir).st_mode