Skip to content

Commit 5cdd827

Browse files
authored
Merge pull request matplotlib#30581 from QuLogic/make-test-safer
TST: Force Agg backend in test_openin_any_paranoid
2 parents 1377f24 + 4a20d0f commit 5cdd827

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)