From 587732986177509e99fa54c529f3fe65a2bc3eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 23 Aug 2021 16:08:27 +0200 Subject: [PATCH] python39Packages.sunpy: fully use pytestCheckHook --- .../python-modules/sunpy/default.nix | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/sunpy/default.nix b/pkgs/development/python-modules/sunpy/default.nix index 0079b44cfd35..55e0c1f5e0ab 100644 --- a/pkgs/development/python-modules/sunpy/default.nix +++ b/pkgs/development/python-modules/sunpy/default.nix @@ -19,7 +19,6 @@ , parfive , pytest-astropy , pytest-mock -, pytest-cov , python-dateutil , scikitimage , scipy @@ -68,22 +67,30 @@ buildPythonPackage rec { checkInputs = [ hypothesis pytest-astropy - pytest-cov pytest-mock ]; # darwin has write permission issues doCheck = stdenv.isLinux; - # ignore documentation tests and ignore tests with schema issues - checkPhase = '' - PY_IGNORE_IMPORTMISMATCH=1 HOME=$(mktemp -d) pytest sunpy -k 'not rst' \ - --deselect=sunpy/tests/tests/test_self_test.py::test_main_nonexisting_module \ - --deselect=sunpy/tests/tests/test_self_test.py::test_main_stdlib_module \ - --ignore=sunpy/io/special/asdf/schemas/sunpy.org/sunpy/coordinates/frames/heliocentric-1.0.0.yaml \ - --ignore=sunpy/io/special/asdf/schemas/sunpy.org/sunpy/coordinates/frames/helioprojective-1.0.0.yaml + preCheck = '' + export HOME=$(mktemp -d) ''; + disabledTests = [ + "rst" + ]; + + disabledTestPaths = [ + "sunpy/io/special/asdf/schemas/sunpy.org/sunpy/coordinates/frames/helioprojective-1.0.0.yaml" + "sunpy/io/special/asdf/schemas/sunpy.org/sunpy/coordinates/frames/heliocentric-1.0.0.yaml" + ]; + + pytestFlagsArray = [ + "--deselect=sunpy/tests/tests/test_self_test.py::test_main_nonexisting_module" + "--deselect=sunpy/tests/tests/test_self_test.py::test_main_stdlib_module" + ]; + meta = with lib; { description = "SunPy: Python for Solar Physics"; homepage = "https://sunpy.org";