Skip to content

Commit

Permalink
Fix min_req text matrix (skip test) (#3496)
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Oct 19, 2021
1 parent 3776819 commit c9360dc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
10 changes: 9 additions & 1 deletion examples/clipping_planes_interactive.py
Expand Up @@ -6,7 +6,15 @@
import numpy as np
from skimage import data
from scipy import ndimage
from meshzoo import icosa_sphere

try:
from meshzoo import icosa_sphere
except ImportError as e:
raise ImportError(
"This example uses a meshzoo but meshzoo is not installed. "
"To install try 'pip install meshzoo'."
) from e


viewer = napari.Viewer(ndisplay=3)

Expand Down
8 changes: 5 additions & 3 deletions examples/spheres.py
Expand Up @@ -4,9 +4,11 @@

try:
from meshzoo import icosa_sphere
except ImportError:
raise ImportError("This example uses a meshzoo but meshzoo is not installed. "
"To install try 'pip install meshzoo'.")
except ImportError as e:
raise ImportError(
"This example uses a meshzoo but meshzoo is not installed. "
"To install try 'pip install meshzoo'."
) from e
import napari


Expand Down
5 changes: 5 additions & 0 deletions napari/_tests/test_examples.py
Expand Up @@ -22,6 +22,11 @@
'custom_key_bindings.py', # breaks EXPECTED_NUMBER_OF_VIEWER_METHODS later
'new_theme.py', # testing theme is extremely slow on CI
]


if os.environ.get('MIN_REQ', '') == '1':
skip.extend(['spheres.py', 'clipping_planes_interactive.py'])

EXAMPLE_DIR = Path(napari.__file__).parent.parent / 'examples'
# using f.name here and re-joining at `run_path()` for test key presentation
# (works even if the examples list is empty, as opposed to using an ids lambda)
Expand Down

0 comments on commit c9360dc

Please sign in to comment.