diff --git a/python-defusedxml.changes b/python-defusedxml.changes index 4236b2f..c260d4c 100644 --- a/python-defusedxml.changes +++ b/python-defusedxml.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 18 09:25:03 UTC 2021 - pgajdos@suse.com + +- use %pytest macro, run lxml tests + ------------------------------------------------------------------- Tue Mar 23 20:19:43 UTC 2021 - Dirk Müller diff --git a/python-defusedxml.spec b/python-defusedxml.spec index 5dcf4a6..69f4176 100644 --- a/python-defusedxml.spec +++ b/python-defusedxml.spec @@ -27,7 +27,11 @@ Group: Development/Languages/Python URL: https://pypi.python.org/pypi/defusedxml Source: https://files.pythonhosted.org/packages/source/d/defusedxml/defusedxml-%{version}.tar.gz BuildRequires: %{python_module setuptools} +# SECTION test requirements +BuildRequires: %{python_module lxml} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module xml} +# /SECTION BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-xml @@ -55,7 +59,9 @@ pitfalls. %if %{with tests} %check -%python_exec setup.py test +# see test_main() in tests.py; test_html_arg: deprecation warning is not raised, perhaps capturing wrongly setup? +usable_tests=$(grep addTests tests.py | sed 's:.*makeSuite(\([a-zA-Z]*\)).*:\1:' | tr '\n' ' ' | sed -e 's: $::' -e 's: : or :g') +%pytest -s -k "($usable_tests) and not test_html_arg" %endif %files %{python_files}