8000 TST: Readd switching to matplotlib Agg backend when doctests are run · numpy/numpy@416a245 · GitHub
[go: up one dir, main page]

Skip to content

Commit 416a245

Browse files
committed
TST: Readd switching to matplotlib Agg backend when doctests are run
1 parent 1bab376 commit 416a245

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

numpy/conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ def check_fpu_mode(request):
114114

115115
@pytest.fixture(autouse=True)
116116
def add_np(doctest_namespace):
117+
# NumPy should probably use more `.. plot::` directives even in
118+
# examples, but as long as we don't, do not block on `plt.show()`
119+
import matplotlib
120+
matplotlib.use("Agg")
117121
doctest_namespace['np'] = numpy
118122

119123
@pytest.fixture(autouse=True)

0 commit comments

Comments
 (0)
0