diff --git a/pkgs/development/python-modules/scikit-image/default.nix b/pkgs/development/python-modules/scikit-image/default.nix index 9c3583fe365a..b06c1cb5db48 100644 --- a/pkgs/development/python-modules/scikit-image/default.nix +++ b/pkgs/development/python-modules/scikit-image/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , fetchFromGitHub , buildPythonPackage , python @@ -63,13 +64,18 @@ in buildPythonPackage rec { # Requires network access (actually some data is loaded via `skimage._shared.testing.fetch` in the global scope, which calls `pytest.skip` when a network is unaccessible, leading to a pytest collection error). "${installedPackageRoot}/skimage/filters/rank/tests/test_rank.py" ]; - pytestFlagsArray = [ "${installedPackageRoot}" "--pyargs" "skimage" ] ++ builtins.map (testid: "--deselect=" + testid) [ + pytestFlagsArray = [ "${installedPackageRoot}" "--pyargs" "skimage" ] ++ builtins.map (testid: "--deselect=" + testid) ([ # These tests require network access "skimage/data/test_data.py::test_skin" "skimage/data/tests/test_data.py::test_skin" "skimage/io/tests/test_io.py::test_imread_http_url" "skimage/restoration/tests/test_rolling_ball.py::test_ndim" - ]; + ] ++ lib.optionals stdenv.isDarwin [ + # Matplotlib tests are broken inside darwin sandbox + "skimage/feature/tests/test_util.py::test_plot_matches" + "skimage/filters/tests/test_thresholding.py::TestSimpleImage::test_try_all_threshold" + "skimage/io/tests/test_mpl_imshow.py::" + ]); # Check cythonized modules pythonImportsCheck = [