From b137621f28ff9b8ce952b8fa117c17f6cbd6cb16 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 24 Jan 2022 23:37:43 +0100 Subject: [PATCH] python3Packages.sgmllib3k: disable failing test on Python 3.10 --- .../python-modules/sgmllib3k/default.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/sgmllib3k/default.nix b/pkgs/development/python-modules/sgmllib3k/default.nix index 1104c843c6ee..c4b0d9bdb94d 100644 --- a/pkgs/development/python-modules/sgmllib3k/default.nix +++ b/pkgs/development/python-modules/sgmllib3k/default.nix @@ -2,14 +2,17 @@ , buildPythonPackage , fetchFromGitHub , isPy27 +, pytestCheckHook +, pythonAtLeast }: buildPythonPackage rec { pname = "sgmllib3k"; version = "1.0.0"; + format = "setuptools"; + disabled = isPy27; - # fetchFromGitHub instead of fetchPypi to run tests. src = fetchFromGitHub { owner = "hsoft"; repo = "sgmllib"; @@ -17,6 +20,18 @@ buildPythonPackage rec { sha256 = "0bzf6pv85dzfxfysm6zbj8m40hp0xzr9h8qlk4hp3nmy88rznqvr"; }; + checkInputs = [ + pytestCheckHook + ]; + + disabledTests = lib.optionals (pythonAtLeast "3.10") [ + "test_declaration_junk_chars" + ]; + + pythonImportsCheck = [ + "sgmllib" + ]; + meta = with lib; { homepage = "https://pypi.org/project/sgmllib3k/"; description = "Python 3 port of sgmllib";