From 0b4090840b2aa0144f36ac102dd808f20a8af9ca Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Apr 22 2020 13:26:17 +0000 Subject: only skip failing tests and only on Python 3.9 Signed-off-by: Nils Philippsen --- diff --git a/python-bleach.spec b/python-bleach.spec index db3ebd3..d1f58c4 100644 --- a/python-bleach.spec +++ b/python-bleach.spec @@ -42,7 +42,7 @@ sed -i 's/pytest-runner>=2.0,<3dev/pytest-runner/' setup.py rm -r bleach/_vendor/ # Bleach has a shim layer that references the vendored html5lib we just deleted. Let's patch up the # imports to use the real html5lib. -sed -i "s/bleach._vendor.html5lib/html5lib/g" bleach/html5lib_shim.py +sed -i "s/bleach._vendor.html5lib/html5lib/g" bleach/html5lib_shim.py tests/test_clean.py %build @@ -59,9 +59,14 @@ if [ $? -ne 0 ]; then /usr/bin/false fi; -# skip tests until this is fixed: +%if "%{python3_version}" != "3.9" +%{__python3} -m pytest +%else +# skip failing tests on Python 3.9 until this is fixed: # https://github.com/mozilla/bleach/issues/503 -# %{__python3} setup.py test +# https://bugs.python.org/issue27657 +%{__python3} -m pytest -k 'not test_uri_value_allowed_protocols or not ("example.com:8000" or "localhost:8000" or "192.168.100.100:8000")' +%endif %files -n python3-%{modname} %license LICENSE @@ -73,6 +78,7 @@ fi; * Wed Apr 22 2020 Nils Philippsen - 3.1.4-1 - version 3.1.4 - use pythonhosted.org source URL as the tarballs match published hashes +- only skip failing tests and only on Python 3.9 * Wed Feb 19 2020 Matthias Runge - 3.1.0-5 - skip tests for python 3.9