From dced68b7180da03c79402211157c0bd3017b99ea Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 5 Mar 2021 23:38:19 +0100 Subject: [PATCH] python3Packages.urllib3: enable tests (#114282) --- .../python-modules/urllib3/default.nix | 50 ++++++++++++++----- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/urllib3/default.nix b/pkgs/development/python-modules/urllib3/default.nix index 7bfb2ba75a35..c255eea04c5c 100644 --- a/pkgs/development/python-modules/urllib3/default.nix +++ b/pkgs/development/python-modules/urllib3/default.nix @@ -1,33 +1,57 @@ -{ lib, buildPythonPackage, fetchPypi -, pytest, mock, tornado, pyopenssl, cryptography -, idna, certifi, ipaddress, pysocks }: +{ lib +, brotli +, buildPythonPackage +, certifi +, cryptography +, dateutil +, fetchPypi +, idna +, mock +, pyopenssl +, pysocks +, pytest-freezegun +, pytest-timeout +, pytestCheckHook +, pythonOlder +, tornado +, trustme +}: buildPythonPackage rec { pname = "urllib3"; version = "1.26.3"; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; sha256 = "de3eedaad74a2683334e282005cd8d7f22f4d55fa690a2a1020a416cb0a47e73"; }; - NOSE_EXCLUDE = lib.concatStringsSep "," [ - "test_headers" "test_headerdict" "test_can_validate_ip_san" "test_delayed_body_read_timeout" - "test_timeout_errors_cause_retries" "test_select_multiple_interrupts_with_event" + propagatedBuildInputs = [ + brotli + certifi + cryptography + idna + pyopenssl + pysocks ]; - checkPhase = '' - nosetests -v --cover-min-percentage 1 - ''; + checkInputs = [ + dateutil + mock + pytest-freezegun + pytest-timeout + pytestCheckHook + tornado + trustme + ]; - doCheck = false; - - checkInputs = [ pytest mock tornado ]; - propagatedBuildInputs = [ pyopenssl cryptography idna certifi ipaddress pysocks ]; + pythonImportsCheck = [ "urllib3" ]; meta = with lib; { description = "Powerful, sanity-friendly HTTP client for Python"; homepage = "https://github.com/shazow/urllib3"; license = licenses.mit; + maintainers = with maintainers; [ fab ]; }; }