python3Packages.csvw: disable failing tests on Python 3.10

This commit is contained in:
Fabian Affolter 2022-02-08 09:16:43 +01:00 committed by Jonathan Ringer
parent 4ff59329de
commit dc9a5b5985

@ -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; {