python3Packages.scikitimage: fix build in darwin sandbox

This commit is contained in:
Dmitry Kalinkin 2021-11-13 23:43:01 -05:00
parent 899f2d8b7f
commit fd50160f86
No known key found for this signature in database
GPG key ID: 5157B3EC8B2CA333

View file

@ -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 = [