diff options
author | Jonathan Ringer <jonringer117@gmail.com> | 2020-06-22 15:43:09 -0700 |
---|---|---|
committer | Jon <jonringer@users.noreply.github.com> | 2020-06-23 16:09:22 -0700 |
commit | 3853e60ae37119ffbcab21fd5dff285c747f9c18 (patch) | |
tree | 6ad0225c5ffe96633315eace94cf1b0dc3449015 /pkgs/development/python-modules/cheroot/default.nix | |
parent | 67e8240371062b36534f08af9ed312a6e04f5239 (diff) |
python3Packages.cheroot: fix tests, cleanup expr
Diffstat (limited to 'pkgs/development/python-modules/cheroot/default.nix')
-rw-r--r-- | pkgs/development/python-modules/cheroot/default.nix | 53 |
1 files changed, 40 insertions, 13 deletions
diff --git a/pkgs/development/python-modules/cheroot/default.nix b/pkgs/development/python-modules/cheroot/default.nix index 269e59b9c184..1ea6b87fa00a 100644 --- a/pkgs/development/python-modules/cheroot/default.nix +++ b/pkgs/development/python-modules/cheroot/default.nix @@ -1,10 +1,19 @@ -{ stdenv, fetchPypi, buildPythonPackage, pythonAtLeast, isPy3k -, more-itertools, six, setuptools_scm, setuptools-scm-git-archive -, pytest, pytestcov, portend, pytest-testmon, pytest-mock -, backports_unittest-mock, pyopenssl, requests, trustme, requests-unixsocket -, backports_functools_lru_cache }: - -let inherit (stdenv) lib; in +{ lib, stdenv, fetchPypi, buildPythonPackage, isPy3k +, jaraco_text +, more-itertools +, portend +, pyopenssl +, pytestCheckHook +, pytestcov +, pytest-mock +, pytest-testmon +, requests +, requests-unixsocket +, setuptools_scm +, setuptools-scm-git-archive +, six +, trustme +}: buildPythonPackage rec { pname = "cheroot"; @@ -19,21 +28,39 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools_scm setuptools-scm-git-archive ]; - propagatedBuildInputs = [ more-itertools six backports_functools_lru_cache ]; + propagatedBuildInputs = [ more-itertools six ]; - checkInputs = [ pytest pytestcov portend backports_unittest-mock pytest-mock pytest-testmon pyopenssl requests trustme requests-unixsocket ]; + checkInputs = [ + jaraco_text + portend + pyopenssl + pytestCheckHook + pytestcov + pytest-mock + pytest-testmon + requests + requests-unixsocket + trustme + ]; # Disable doctest plugin because times out # Disable xdist (-n arg) because it's incompatible with testmon # Deselect test_bind_addr_unix on darwin because times out # Deselect test_http_over_https_error on darwin because builtin cert fails # Disable warnings-as-errors because of deprecation warnings from socks on python 3.7 - checkPhase = '' - substituteInPlace pytest.ini --replace "--doctest-modules" "" --replace "-n auto" "" - ${lib.optionalString (pythonAtLeast "3.7") "sed -i '/warnings/,+2d' pytest.ini"} - pytest -k 'not tls' ${lib.optionalString stdenv.isDarwin "--deselect=cheroot/test/test_ssl.py::test_http_over_https_error --deselect=cheroot/test/test_server.py::test_bind_addr_unix"} + # adds many other pytest utilities which aren't necessary like linting + preCheck = '' + rm pytest.ini ''; + disabledTests= [ + "tls" # touches network + "peercreds_unix_sock" # test urls no longer allowed + ] ++ lib.optionals stdenv.isDarwin [ + "http_over_https_error" + "bind_addr_unix" + ]; + # Some of the tests use localhost networking. __darwinAllowLocalNetworking = true; |