Monkey patch cells3d data
@@ -2,8 +2,10 @@ import os
import runpy
from pathlib import Path
+import numpy as np
import pytest
from qtpy import API_NAME
+import skimage.data
import napari
from napari._qt.qt_main_window import Window
@@ -55,6 +57,8 @@ def test_examples(fname, monkeypatch):
monkeypatch.setattr(Window, 'show', lambda *a: None)
# prevent running the event loop
monkeypatch.setattr(napari, 'run', lambda *a, **k: None)
+ # Prevent downloading example data because this sometimes fails.
+ monkeypatch.setattr(skimage.data, 'cells3d', lambda: np.zeros((60, 2, 256, 256), dtype=np.uint16))
# make sure our sys.excepthook override doesn't hide errors
def raise_errors(etype, value, tb):
