forked from pool/python-chardet
- Add patch to fix build with pytest4:
* pytest4.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-chardet?expand=0&rev=43
This commit is contained in:
committed by
Git OBS Bridge
parent
0712b8a2c8
commit
df52f66846
23
pytest4.patch
Normal file
23
pytest4.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
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 | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test.py b/test.py
|
||||
index 9833307..ad2b753 100644
|
||||
--- a/test.py
|
||||
+++ b/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
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 3 08:32:17 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Add patch to fix build with pytest4:
|
||||
* pytest4.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 26 08:14:25 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ Group: Development/Languages/Python
|
||||
URL: https://github.com/chardet/chardet
|
||||
Source0: https://files.pythonhosted.org/packages/source/c/chardet/chardet-%{version}.tar.gz
|
||||
Source1: python-chardet-rpmlintrc
|
||||
Patch0: pytest4.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
@@ -77,6 +78,7 @@ or more files::
|
||||
|
||||
%prep
|
||||
%setup -q -n chardet-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@@ -92,7 +94,7 @@ mv %{buildroot}%{_bindir}/chardetect %{buildroot}%{_bindir}/chardetect-%{$python
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_version} test.py
|
||||
%pytest test.py
|
||||
%endif
|
||||
|
||||
%if !%{with test}
|
||||
|
||||
Reference in New Issue
Block a user