about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2019-05-01 13:26:05 +0200
committerGitHub <noreply@github.com>2019-05-01 13:26:05 +0200
commit7909ed1dee47fa154c63937bbf2c0351fe9bbdc8 (patch)
tree8a63fff6f50c30973e20d8aced1c3f077f690ce8
parentf13778392713bca1aca3b9252c727cf0556d6b2b (diff)
downloadnixlib-7909ed1dee47fa154c63937bbf2c0351fe9bbdc8.tar
nixlib-7909ed1dee47fa154c63937bbf2c0351fe9bbdc8.tar.gz
nixlib-7909ed1dee47fa154c63937bbf2c0351fe9bbdc8.tar.bz2
nixlib-7909ed1dee47fa154c63937bbf2c0351fe9bbdc8.tar.lz
nixlib-7909ed1dee47fa154c63937bbf2c0351fe9bbdc8.tar.xz
nixlib-7909ed1dee47fa154c63937bbf2c0351fe9bbdc8.tar.zst
nixlib-7909ed1dee47fa154c63937bbf2c0351fe9bbdc8.zip
python.pkgs.pyasn1-modules: fix python2 tests (#60618)
Broken by the update in e03d55130fbf50563322fe5ad6fe76fe17a508ac.
-rw-r--r--pkgs/development/python-modules/pyasn1-modules/default.nix18
1 files changed, 17 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/pyasn1-modules/default.nix b/pkgs/development/python-modules/pyasn1-modules/default.nix
index 78ebce186085..9817a73be92c 100644
--- a/pkgs/development/python-modules/pyasn1-modules/default.nix
+++ b/pkgs/development/python-modules/pyasn1-modules/default.nix
@@ -1,4 +1,10 @@
-{ stdenv, buildPythonPackage, fetchPypi, pyasn1, isPyPy }:
+{ stdenv
+, buildPythonPackage
+, fetchPypi
+, pyasn1
+, isPyPy
+, pytest
+}:
 
 buildPythonPackage rec {
   pname = "pyasn1-modules";
@@ -11,6 +17,16 @@ buildPythonPackage rec {
 
   propagatedBuildInputs = [ pyasn1 ];
 
+  checkInputs = [
+    pytest
+  ];
+
+  # running tests through setup.py fails only for python2 for some reason:
+  # AttributeError: 'module' object has no attribute 'suitetests'
+  checkPhase = ''
+    py.test
+  '';
+
   meta = with stdenv.lib; {
     description = "A collection of ASN.1-based protocols modules";
     homepage = https://pypi.python.org/pypi/pyasn1-modules;