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

View File

@ -1,13 +1,13 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, pythonAtLeast
, pythonOlder , pythonOlder
, attrs , attrs
, isodate , isodate
, python-dateutil , python-dateutil
, rfc3986 , rfc3986
, uritemplate , uritemplate
, mock
, pytestCheckHook , pytestCheckHook
, pytest-mock , pytest-mock
}: }:
@ -15,6 +15,8 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "csvw"; pname = "csvw";
version = "1.11.0"; version = "1.11.0";
format = "setuptools";
disabled = pythonOlder "3.6"; disabled = pythonOlder "3.6";
src = fetchFromGitHub { src = fetchFromGitHub {
@ -24,10 +26,6 @@ buildPythonPackage rec {
sha256 = "1393xwqawaxsflbq62vks92vv4zch8p6dd1mdvdi7j4vvf0zljkg"; sha256 = "1393xwqawaxsflbq62vks92vv4zch8p6dd1mdvdi7j4vvf0zljkg";
}; };
patchPhase = ''
substituteInPlace setup.cfg --replace "--cov" ""
'';
propagatedBuildInputs = [ propagatedBuildInputs = [
attrs attrs
isodate isodate
@ -37,15 +35,28 @@ buildPythonPackage rec {
]; ];
checkInputs = [ checkInputs = [
mock
pytestCheckHook pytestCheckHook
pytest-mock pytest-mock
]; ];
patchPhase = ''
substituteInPlace setup.cfg \
--replace "--cov" ""
'';
disabledTests = [ disabledTests = [
# this test is flaky on darwin because it depends on the resolution of filesystem mtimes # 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 # https://github.com/cldf/csvw/blob/45584ad63ff3002a9b3a8073607c1847c5cbac58/tests/test_db.py#L257
"test_write_file_exists" "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; { meta = with lib; {