summary refs log tree commit diff
path: root/pkgs/development/python-modules/cheroot
diff options
context:
space:
mode:
authorMarti Serra <marti.serra.coscollano@gmail.com>2018-06-28 09:35:58 +0200
committerMarti Serra <marti.serra.coscollano@gmail.com>2018-06-28 11:13:25 +0200
commite82e01bb612a8afef56ef7870ec2710e0936f462 (patch)
treee004a3422f01b474424a57c43159608accaa7763 /pkgs/development/python-modules/cheroot
parent352995d79b9fac78c7414a8c880662892ed495cc (diff)
downloadnixpkgs-e82e01bb612a8afef56ef7870ec2710e0936f462.tar
nixpkgs-e82e01bb612a8afef56ef7870ec2710e0936f462.tar.gz
nixpkgs-e82e01bb612a8afef56ef7870ec2710e0936f462.tar.bz2
nixpkgs-e82e01bb612a8afef56ef7870ec2710e0936f462.tar.lz
nixpkgs-e82e01bb612a8afef56ef7870ec2710e0936f462.tar.xz
nixpkgs-e82e01bb612a8afef56ef7870ec2710e0936f462.tar.zst
nixpkgs-e82e01bb612a8afef56ef7870ec2710e0936f462.zip
pythonPackages.cheroot: fixed tests
Diffstat (limited to 'pkgs/development/python-modules/cheroot')
-rw-r--r--pkgs/development/python-modules/cheroot/default.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/cheroot/default.nix b/pkgs/development/python-modules/cheroot/default.nix
index 398f52cefd2..7a7d44339ba 100644
--- a/pkgs/development/python-modules/cheroot/default.nix
+++ b/pkgs/development/python-modules/cheroot/default.nix
@@ -1,7 +1,8 @@
 { stdenv, fetchPypi, buildPythonPackage
 , more-itertools, six
 , pytest, pytestcov, portend
-, backports_unittest-mock, setuptools_scm }:
+, backports_unittest-mock
+, backports_functools_lru_cache }:
 
 buildPythonPackage rec {
   pname = "cheroot";
@@ -14,9 +15,16 @@ buildPythonPackage rec {
 
   propagatedBuildInputs = [ more-itertools six ];
 
-  buildInputs = [ setuptools_scm ];
+  checkInputs = [ pytest pytestcov portend backports_unittest-mock backports_functools_lru_cache ];
 
-  checkInputs = [ pytest pytestcov portend backports_unittest-mock ];
+# Disable testmon, it needs pytest-testmon, which we do not currently have in nikpkgs,
+# and is only used to skip some tests that are already known to work.
+  postPatch = ''
+    substituteInPlace "./pytest.ini" --replace "--testmon" ""
+    substituteInPlace setup.py --replace "use_scm_version=True" "version=\"${version}\"" \
+  --replace "'setuptools_scm>=1.15.0'," "" \
+  --replace "'setuptools_scm_git_archive>=1.0'," "" \
+  '';
 
   checkPhase = ''
     py.test cheroot