|
1 | 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:54:41.000000000 +0100 |
3 |
| -@@ -41,11 +41,12 @@ |
| 2 | ++++ tests/test_backends_interactive.py 2017-05-31 12:07:50.000000000 +0100 |
| 3 | +@@ -21,10 +21,12 @@ |
| 4 | + |
| 5 | + def _get_available_backends(): |
| 6 | + return [ |
| 7 | +- pytest.mark.skipif(sys.version_info < (3,) |
| 8 | +- or importlib.util.find_spec(module_name) is None, |
| 9 | +- reason="Could not import {!r}".format(module_name))( |
| 10 | +- backend) |
| 11 | ++ pytest.mark.skipif( |
| 12 | ++ not os.environ.get("DISPLAY") |
| 13 | ++ or sys.version_info < (3,) |
| 14 | ++ or importlib.util.find_spec(module_name) is None, |
| 15 | ++ reason="No /tmp/launch-jw0bwI/org.macosforge.xquartz:0, or could not import {!r}".format(module_name))( |
| 16 | ++ backend) |
| 17 | + for module_name, backend in [ |
| 18 | + ("PyQt5", "qt5agg"), |
| 19 | + ("tkinter", "tkagg"), |
| 20 | +@@ -41,8 +43,6 @@ |
4 | 21 | """
|
5 | 22 |
|
6 | 23 |
|
7 |
| -+@pytest.mark.parametrize("backend", _get_available_backends()) |
8 |
| - @pytest.mark.skipif("DISPLAY" not in os.environ, |
9 |
| - reason="The DISPLAY environment variable is not set.") |
10 |
| --@pytest.mark.parametrize("backend", _get_available_backends()) |
| 24 | +-@pytest.mark.skipif("DISPLAY" not in os.environ, |
| 25 | +- reason="The DISPLAY environment variable is not set.") |
| 26 | + @pytest.mark.parametrize("backend", _get_available_backends()) |
11 | 27 | def test_backend(backend):
|
12 | 28 | environ = os.environ.copy()
|
13 |
| -+ assert environ.get('DISPLAY') is None |
14 |
| - environ["MPLBACKEND"] = backend |
15 |
| - proc = Popen([sys.executable, "-c", _test_script], env=environ) |
16 |
| - # Empirically, 1s is not enough on Travis. |
|
0 commit comments