From 3e9a7c117efda019d75af4235bbf3afdac034da5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 29 Dec 2022 22:48:33 +0100 Subject: [PATCH] python310Packages.proxy-py: disable failing tests --- .../python-modules/proxy-py/default.nix | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/proxy-py/default.nix b/pkgs/development/python-modules/proxy-py/default.nix index c3580e23b233..c454e74ab3d9 100644 --- a/pkgs/development/python-modules/proxy-py/default.nix +++ b/pkgs/development/python-modules/proxy-py/default.nix @@ -1,7 +1,10 @@ { lib , stdenv +, bash , buildPythonPackage , fetchFromGitHub +, gnumake +, httpx , openssl , paramiko , pytest-asyncio @@ -15,7 +18,7 @@ buildPythonPackage rec { pname = "proxy-py"; version = "2.4.3"; - format = "setuptools"; + format = "pyproject"; disabled = pythonOlder "3.7"; @@ -26,6 +29,15 @@ buildPythonPackage rec { hash = "sha256-dA7a9RicBFCSf6IoGX/CdvI8x/xMOFfNtyuvFn9YmHI="; }; + postPatch = '' + substituteInPlace Makefile \ + --replace "SHELL := /bin/bash" "SHELL := ${bash}/bin/bash" + substituteInPlace pytest.ini \ + --replace "-p pytest_cov" "" \ + --replace "--no-cov-on-fail" "" + sed -i "/--cov/d" pytest.ini + ''; + nativeBuildInputs = [ setuptools-scm ]; @@ -36,7 +48,9 @@ buildPythonPackage rec { ]; checkInputs = [ + httpx openssl + gnumake pytest-asyncio pytest-mock pytestCheckHook @@ -46,10 +60,12 @@ buildPythonPackage rec { export HOME=$(mktemp -d); ''; - postPatch = '' - substituteInPlace requirements.txt \ - --replace "typing-extensions==3.7.4.3" "typing-extensions" - ''; + disabledTests = [ + # Test requires network access + "test_http2_via_proxy" + # Tests run into a timeout + "integration" + ]; pythonImportsCheck = [ "proxy"