Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit 0b3eb99

Browse files
committed
add fixture to disable poping plot windows in tests
1 parent 92daa8b commit 0b3eb99

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/conftest.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
"""conftest.py contains fixtures that are automatically imported by pytest."""
2+
import pytest
3+
import matplotlib
4+
5+
6+
@pytest.fixture(autouse=True, scope='session')
7+
def set_matplotlib_backend():
8+
matplotlib.use('Agg') # to avoid opening windows during testing

0 commit comments

Comments
 (0)