summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLars-Dominik Braun <ldb@leibniz-psychology.org>2020-10-07 09:32:34 +0200
committerMarius Bakke <marius@gnu.org>2020-10-13 23:36:43 +0200
commit331aaf52806b27430c4efaf8f230097ede69e61a (patch)
treed00e091c1719bb27d0bb12762511bc1e93a794a7 /gnu
parent3182d629a25b1132fc542391b451580d44d9f92c (diff)
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 <marius@gnu.org>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/patches/python-chardet-3.0.4-pytest.patch15
-rw-r--r--gnu/packages/python-xyz.scm5
3 files changed, 18 insertions, 3 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index d09875c5834..f3aeab36fd6 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1491,6 +1491,7 @@ dist_patch_DATA = \
1491 %D%/packages/patches/python-argcomplete-1.11.1-fish31.patch \ 1491 %D%/packages/patches/python-argcomplete-1.11.1-fish31.patch \
1492 %D%/packages/patches/python-axolotl-AES-fix.patch \ 1492 %D%/packages/patches/python-axolotl-AES-fix.patch \
1493 %D%/packages/patches/python-cairocffi-dlopen-path.patch \ 1493 %D%/packages/patches/python-cairocffi-dlopen-path.patch \
1494 %D%/packages/patches/python-chardet-3.0.4-pytest.patch \
1494 %D%/packages/patches/python-cross-compile.patch \ 1495 %D%/packages/patches/python-cross-compile.patch \
1495 %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ 1496 %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \
1496 %D%/packages/patches/python-configobj-setuptools.patch \ 1497 %D%/packages/patches/python-configobj-setuptools.patch \
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 00000000000..d5bf7ccc282
--- /dev/null
+++ b/gnu/packages/patches/python-chardet-3.0.4-pytest.patch
@@ -0,0 +1,15 @@
1Fix test failure with Pytest 4.
2
3Taken from upstream:
4https://github.com/chardet/chardet/commit/440828f8faafdb58700c64a9ea8f6a30b154c08b
5
6diff --git a/test.py b/test.py
7--- a/test.py
8+++ b/test.py
9@@ -59,5 +59,5 @@ def gen_test_params():
10 full_path = join(path, file_name)
11 test_case = full_path, encoding
12 if full_path in EXPECTED_FAILURES:
13- test_case = pytest.mark.xfail(test_case)
14+ test_case = pytest.param(*test_case, marks=pytest.mark.xfail)
15 yield test_case
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 56c7bb84ab6..402007d0c29 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.")
10059 (uri (pypi-uri "chardet" version)) 10059 (uri (pypi-uri "chardet" version))
10060 (sha256 10060 (sha256
10061 (base32 10061 (base32
10062 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4")))) 10062 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))
10063 (patches (search-patches "python-chardet-3.0.4-pytest.patch"))))
10063 (native-inputs 10064 (native-inputs
10064 `(("python-hypothesis" ,python-hypothesis) 10065 `(("python-hypothesis" ,python-hypothesis)
10065 ("python-pytest" ,python-pytest) 10066 ("python-pytest" ,python-pytest)
10066 ("python-pytest-runner" ,python-pytest-runner))) 10067 ("python-pytest-runner" ,python-pytest-runner)))
10067 (build-system python-build-system) 10068 (build-system python-build-system)
10068 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10069 (arguments `(#:tests? #f))
10070 (home-page "https://github.com/chardet/chardet") 10069 (home-page "https://github.com/chardet/chardet")
10071 (synopsis "Universal encoding detector for Python 2 and 3") 10070 (synopsis "Universal encoding detector for Python 2 and 3")
10072 (description 10071 (description