From 3f2ced3da4716dc94fc192755fc25251daa0403fc3f7afeaa682e6110a9ef0ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 3 Sep 2018 08:57:27 +0000 Subject: [PATCH] - Write up the tests syntax to match up rest python packages OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rebulk?expand=0&rev=7 --- python-rebulk.changes | 5 +++++ python-rebulk.spec | 11 +++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/python-rebulk.changes b/python-rebulk.changes index 6776523..043455b 100644 --- a/python-rebulk.changes +++ b/python-rebulk.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Sep 3 08:57:02 UTC 2018 - Tomáš Chvátal + +- Write up the tests syntax to match up rest python packages + ------------------------------------------------------------------- Sat Sep 1 11:11:27 UTC 2018 - aloisio@gmx.com diff --git a/python-rebulk.spec b/python-rebulk.spec index d5c3f69..d7fcf0e 100644 --- a/python-rebulk.spec +++ b/python-rebulk.spec @@ -53,6 +53,8 @@ done for i in {'default_rules_module','__init__','rebulk_rules_module','rules_module','test_chain','test_debug','test_introspector','test_loose','test_match','test_pattern','test_processors','test_rebulk','test_rules','test_toposort','test_validators'}; do sed -i -e "1d" "rebulk/test/$i.py" done +# remove debug test that will always fail in OBS +rm rebulk/test/test_debug.py %build %python_build @@ -61,14 +63,11 @@ done %python_install %python_expand %fdupes -s %{buildroot}%{$python_sitelib} -%if 0%{?suse_version} > 1315 %check -%{python_expand pushd %{buildroot}%{$python_sitelib}/rebulk -$python %{_bindir}/py.test --ignore test/test_debug.py -rm -rf .pytest_cache -popd +export PYTHONDONTWRITEBYTECODE=1 +%{python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} +py.test-%{$python_version} rebulk/test/ } -%endif %files %{python_files} %doc README.rst