We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 415a237 commit d5f5872Copy full SHA for d5f5872
1 file changed
src/napari_matplotlib/tests/conftest.py
@@ -1,3 +1,5 @@
1
+import os
2
+
3
import numpy as np
4
import pytest
5
from skimage import data
@@ -22,3 +24,17 @@ def astronaut_data():
22
24
@pytest.fixture
23
25
def brain_data():
26
return data.brain(), {"rgb": False}
27
28
29
+@pytest.fixture(autouse=True, scope="session")
30
+def set_strict_qt():
31
+ env_var = "NAPARI_STRICT_QT"
32
+ old_val = os.environ.get(env_var)
33
+ os.environ[env_var] = "1"
34
+ # Run tests
35
+ yield
36
+ # Reset to original value
37
+ if old_val is not None:
38
+ os.environ[env_var] = old_val
39
+ else:
40
+ del os.environ[env_var]
0 commit comments