From 331aaf52806b27430c4efaf8f230097ede69e61a Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Wed, 7 Oct 2020 09:32:34 +0200 Subject: gnu: python-chardet: Enable tests. * gnu/packages/python-xyz.scm (python-chardet) [source]: Add upstream patch. [arguments]: Remove. * gnu/packages/patches/python-chardet-3.0.4-pytest.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Marius Bakke --- gnu/packages/patches/python-chardet-3.0.4-pytest.patch | 15 +++++++++++++++ gnu/packages/python-xyz.scm | 5 ++--- 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/python-chardet-3.0.4-pytest.patch (limited to 'gnu/packages') diff --git a/gnu/packages/patches/python-chardet-3.0.4-pytest.patch b/gnu/packages/patches/python-chardet-3.0.4-pytest.patch new file mode 100644 index 0000000000..d5bf7ccc28 --- /dev/null +++ b/gnu/packages/patches/python-chardet-3.0.4-pytest.patch @@ -0,0 +1,15 @@ +Fix test failure with Pytest 4. + +Taken from upstream: +https://github.com/chardet/chardet/commit/440828f8faafdb58700c64a9ea8f6a30b154c08b + +diff --git a/test.py b/test.py +--- a/test.py ++++ b/test.py +@@ -59,5 +59,5 @@ def gen_test_params(): + full_path = join(path, file_name) + test_case = full_path, encoding + if full_path in EXPECTED_FAILURES: +- test_case = pytest.mark.xfail(test_case) ++ test_case = pytest.param(*test_case, marks=pytest.mark.xfail) + yield test_case diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 56c7bb84ab..402007d0c2 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -10059,14 +10059,13 @@ simulation, statistical modeling, machine learning and much more.") (uri (pypi-uri "chardet" version)) (sha256 (base32 - "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4")))) + "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4")) + (patches (search-patches "python-chardet-3.0.4-pytest.patch")))) (native-inputs `(("python-hypothesis" ,python-hypothesis) ("python-pytest" ,python-pytest) ("python-pytest-runner" ,python-pytest-runner))) (build-system python-build-system) - ;; XXX: Incompatible with Pytest 4: . - (arguments `(#:tests? #f)) (home-page "https://github.com/chardet/chardet") (synopsis "Universal encoding detector for Python 2 and 3") (description -- cgit v1.2.3