about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2020-11-30 19:02:52 -0800
committerFrederik Rietdijk <fridh@fridh.nl>2020-12-01 14:44:26 +0100
commit7c0fe73bad6234ece41f94053c2b8114b9a20a8d (patch)
treef0ea2183631f41b319f935d124b30bd970d8876f
parenteb8d1214b6ba1420e72efa569cc35df4fe84e510 (diff)
python3Packages.pyproj: fix tests
-rw-r--r--pkgs/development/python-modules/pyproj/default.nix33
1 files changed, 18 insertions, 15 deletions
diff --git a/pkgs/development/python-modules/pyproj/default.nix b/pkgs/development/python-modules/pyproj/default.nix
index b23cb010f0171..c000283e6de86 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";