From 10349c347326deffdd74953e6e00c02c47daaabe Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 10 Nov 2023 10:25:06 +0100 Subject: [PATCH] python311Packages.mechanize: enable tests --- .../python-modules/mechanize/default.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/mechanize/default.nix b/pkgs/development/python-modules/mechanize/default.nix index 0394572cff4e..0f89f3f42525 100644 --- a/pkgs/development/python-modules/mechanize/default.nix +++ b/pkgs/development/python-modules/mechanize/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , fetchPypi , html5lib +, pytestCheckHook , pythonOlder , setuptools }: @@ -26,12 +27,26 @@ buildPythonPackage rec { html5lib ]; - doCheck = false; + nativeCheckInputs = [ + pytestCheckHook + ]; pythonImportsCheck = [ "mechanize" ]; + disabledTestPaths = [ + # Tests require network access + "test/test_urllib2_localnet.py" + "test/test_functional.py" + ]; + + disabledTests = [ + # Tests require network access + "test_pickling" + "test_password_manager" + ]; + meta = with lib; { description = "Stateful programmatic web browsing in Python"; homepage = "https://github.com/python-mechanize/mechanize";