8000 Do extra assert for display in test · MacPython/matplotlib-wheels@52d3d7d · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Apr 16, 2021. It is now read-only.

Commit 52d3d7d

Browse files
committed
Do extra assert for display in test
1 parent 7ff2692 commit 52d3d7d

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

patches/test_backends.patch

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
--- tests/test_backends_interactive.py.old 2017-05-29 20:56:31.000000000 +0100
2-
+++ tests/test_backends_interactive.py 2017-05-29 20:57:15.000000000 +0100
3-
@@ -41,7 +41,7 @@
4-
"""
5-
6-
7-
-@pytest.mark.skipif("DISPLAY" not in os.environ,
8-
+@pytest.mark.skipif(print("===", repr(os.environ.get("DISPLAY")), "===") or not os.environ.get("DISPLAY"),
9-
reason="The DISPLAY environment variable is not set.")
1+
--- tests/test_backends_interactive.py.old 2017-05-30 09:29:32.000000000 +0100
2+
+++ tests/test_backends_interactive.py 2017-05-30 09:31:19.000000000 +0100
3+
@@ -46,6 +46,7 @@
104
@pytest.mark.parametrize("backend", _get_available_backends())
115
def test_backend(backend):
6+
environ = os.environ.copy()
7+
+ assert environ.get('DISPLAY') is None
8+
environ["MPLBACKEND"] = backend
9+
proc = Popen([sys.executable, "-c", _test_script], env=environ)
10+
# Empirically, 1s is not enough on Travis.

0 commit comments

Comments
 (0)
0