From 7c0fe73bad6234ece41f94053c2b8114b9a20a8d Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Mon, 30 Nov 2020 19:02:52 -0800 Subject: python3Packages.pyproj: fix tests --- pkgs/development/python-modules/pyproj/default.nix | 33 ++++++++++++---------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/pyproj/default.nix b/pkgs/development/python-modules/pyproj/default.nix index b23cb010f017..c000283e6de8 100644 --- a/pkgs/development/python-modules/pyproj/default.nix +++ b/pkgs/development/python-modules/pyproj/default.nix @@ -1,7 +1,7 @@ { lib, buildPythonPackage, fetchFromGitHub, python, pkgs, pythonOlder, isPy27, substituteAll , aenum , cython -, pytest +, pytestCheckHook , mock , numpy , shapely @@ -34,20 +34,23 @@ buildPythonPackage rec { numpy shapely ] ++ lib.optional (pythonOlder "3.6") aenum; - checkInputs = [ pytest mock ]; - - # ignore rounding errors, and impure docgen - # datadir is ignored because it does the proj look up logic, which isn't relevant - checkPhase = '' - pytest . -k 'not alternative_grid_name \ - and not transform_wgs84_to_alaska \ - and not transformer_group__unavailable \ - and not transform_group__missing_best \ - and not datum \ - and not repr' \ - --ignore=test/test_doctest_wrapper.py \ - --ignore=test/test_datadir.py - ''; + checkInputs = [ pytestCheckHook mock ]; + + # prevent importing local directory + preCheck = "cd test"; + pytestFlagsArray = [ + "--ignore=test_doctest_wrapper.py" + "--ignore=test_datadir.py" + ]; + + disabledTests = [ + "alternative_grid_name" + "transform_wgs84_to_alaska" + "transformer_group__unavailable" + "transform_group__missing_best" + "datum" + "repr" + ]; meta = { description = "Python interface to PROJ.4 library"; -- cgit v1.2.3