From 7909ed1dee47fa154c63937bbf2c0351fe9bbdc8 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Wed, 1 May 2019 13:26:05 +0200 Subject: [PATCH] python.pkgs.pyasn1-modules: fix python2 tests (#60618) Broken by the update in e03d55130fbf50563322fe5ad6fe76fe17a508ac. --- .../python-modules/pyasn1-modules/default.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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;