From 4bf006ca4bff80e8b167803e2a6f88e46ab1a9c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 21 Aug 2018 16:56:38 +0200 Subject: [PATCH] Use pytest-expect on python3 (#1593231) --- python-html5lib.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/python-html5lib.spec b/python-html5lib.spec index 62fcfed..fc5d0c6 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -47,6 +47,7 @@ BuildRequires: python3-setuptools # Test deps BuildRequires: python3-mock BuildRequires: python3-pytest +BuildRequires: python3-pytest-expect BuildRequires: python3-six BuildRequires: python3-webencodings @@ -76,7 +77,10 @@ specification for maximum compatibility with major desktop web browsers. %check -# we don't have pytest-expect, this is hack, TODO: package pytest-expect +# we have python3-pytest-expect, so python3 tests first +%{__python3} -m pytest + +# we don't have python2-pytest-expect, this is a workaround sed -i \ -e 's/config.option.update_xfail/False/' \ -e 's/^fail_if_missing_pytest_expect.*//' \ @@ -86,10 +90,9 @@ sed -i \ mv html5lib/tests/testdata{,_nope} mkdir -p html5lib/tests/testdata/encoding/chardet/ cp html5lib/tests/testdata{_nope,}/encoding/chardet/test_big5.txt -# hack ends here +# workaround ends here %{__python2} -m pytest -%{__python3} -m pytest %files -n python2-%{srcname}