From dc9a5b5985cfb6fad69eb1b88730473111fa1fc9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 8 Feb 2022 09:16:43 +0100 Subject: [PATCH] python3Packages.csvw: disable failing tests on Python 3.10 --- .../python-modules/csvw/default.nix | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/csvw/default.nix b/pkgs/development/python-modules/csvw/default.nix index 67342d9eccc8..7ae79f4ec59f 100644 --- a/pkgs/development/python-modules/csvw/default.nix +++ b/pkgs/development/python-modules/csvw/default.nix @@ -1,13 +1,13 @@ { lib , buildPythonPackage , fetchFromGitHub +, pythonAtLeast , pythonOlder , attrs , isodate , python-dateutil , rfc3986 , uritemplate -, mock , pytestCheckHook , pytest-mock }: @@ -15,6 +15,8 @@ buildPythonPackage rec { pname = "csvw"; version = "1.11.0"; + format = "setuptools"; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { @@ -24,10 +26,6 @@ buildPythonPackage rec { sha256 = "1393xwqawaxsflbq62vks92vv4zch8p6dd1mdvdi7j4vvf0zljkg"; }; - patchPhase = '' - substituteInPlace setup.cfg --replace "--cov" "" - ''; - propagatedBuildInputs = [ attrs isodate @@ -37,15 +35,28 @@ buildPythonPackage rec { ]; checkInputs = [ - mock pytestCheckHook pytest-mock ]; + patchPhase = '' + substituteInPlace setup.cfg \ + --replace "--cov" "" + ''; + disabledTests = [ # this test is flaky on darwin because it depends on the resolution of filesystem mtimes # https://github.com/cldf/csvw/blob/45584ad63ff3002a9b3a8073607c1847c5cbac58/tests/test_db.py#L257 "test_write_file_exists" + ] ++ lib.optionals (pythonAtLeast "3.10") [ + # https://github.com/cldf/csvw/issues/58 + "test_roundtrip_escapechar" + "test_escapequote_escapecharquotechar_final" + "test_doubleQuote" + ]; + + pythonImportsCheck = [ + "csvw" ]; meta = with lib; {