diff options
author | Kubilay Kocak <koobs@FreeBSD.org> | 2019-12-20 10:38:12 +0000 |
---|---|---|
committer | Kubilay Kocak <koobs@FreeBSD.org> | 2019-12-20 10:38:12 +0000 |
commit | 657c6df3d174cfde663ff8790e538e8147836a94 (patch) | |
tree | a372514fa878abbb19f79596447322e4eb8443b9 | |
parent | f5ee4db3b9bd3de38006199fcb6370a71ae942f0 (diff) | |
download | ports-657c6df3d174cfde663ff8790e538e8147836a94.tar.gz ports-657c6df3d174cfde663ff8790e538e8147836a94.zip |
MFH: r520358 textproc/py-charset: Fix test target
Fix test invocation with pytest 4.x [1], which was failing with:
if len(param.values) != len(argnames):
E TypeError: object of type 'MarkDecorator' has no len()
While here, fix out of order MASTER_SITES
[1] https://github.com/chardet/chardet/pull/174
Approved by: portmgr (blanket: ports compliance)
Approved by: ports-secteam (blanket(s): bugfix, ports compliance)
Notes
Notes:
svn path=/branches/2019Q4/; revision=520499
-rw-r--r-- | textproc/py-chardet/Makefile | 4 | ||||
-rw-r--r-- | textproc/py-chardet/files/patch-test.py | 16 |
2 files changed, 18 insertions, 2 deletions
diff --git a/textproc/py-chardet/Makefile b/textproc/py-chardet/Makefile index 02ebc1a3cf59..172fa3d7c29d 100644 --- a/textproc/py-chardet/Makefile +++ b/textproc/py-chardet/Makefile @@ -3,10 +3,10 @@ PORTNAME= chardet PORTVERSION= 3.0.4 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= textproc python -PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= rm@FreeBSD.org COMMENT= Universal encoding detector for Python 2 and 3 diff --git a/textproc/py-chardet/files/patch-test.py b/textproc/py-chardet/files/patch-test.py new file mode 100644 index 000000000000..73c3e092398b --- /dev/null +++ b/textproc/py-chardet/files/patch-test.py @@ -0,0 +1,16 @@ +From 0561ddcedcd12ea1f98b7ddedb93686ed8a5ffa4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz> +Date: Tue, 12 Mar 2019 18:44:36 +0100 +Subject: [PATCH] Support pytest 4, don't apply marks directly to parameters + +Fixes https://github.com/chardet/chardet/issues/173 + +--- test.py.orig 2019-12-18 03:03:28 UTC ++++ test.py +@@ -59,7 +59,7 @@ 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 |