Skip to content

Commit 70e09c2

Browse files
authored
Fix issue with windows and matplolib (#470)
* Empty commit for test * fix error on windows * config only with matplolib * fix str * try to fix the import
1 parent 0723734 commit 70e09c2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/conftest.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33

44
from hidimstat._utils.scenario import multivariate_simulation
55

6+
try:
7+
import matplotlib
8+
except ImportError:
9+
matplotlib = None
10+
11+
12+
def pytest_configure(config): # noqa: ARG001
13+
"""Use Agg so that no figures pop up."""
14+
if matplotlib is not None:
15+
matplotlib.use("Agg", force=True)
16+
617

718
@pytest.fixture
819
def data_generator(

0 commit comments

Comments
 (0)