Skip to content

Commit 4a20d0f

Browse files
committed
TST: Force Agg backend in test_openin_any_paranoid
On some CI, the Qt backend seems to be picked, but something is confused and it fails due to an invalid `DISPLAY` variable. But this test doesn't need an interactive backend, so don't use one.
1 parent 01cfcb0 commit 4a20d0f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/tests/test_texmanager.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def test_openin_any_paranoid():
7070
'import matplotlib.pyplot as plt;'
7171
'plt.rcParams.update({"text.usetex": True});'
7272
'plt.title("paranoid");'
73-
'plt.show(block=False);'],
74-
env={**os.environ, 'openin_any': 'p'}, check=True, capture_output=True)
73+
'plt.gcf().canvas.draw();'],
74+
env={**os.environ, 'MPLBACKEND': 'Agg', 'openin_any': 'p'},
75+
check=True, capture_output=True)
7576
assert completed.stderr == ""

0 commit comments

Comments
 (0)