From 3be7e3a5ca058d6c3dd517b3439f17be9a81b538 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Wed, 12 Jan 2022 20:29:19 +0100 Subject: [PATCH] use use pytest for running tests --- python-filelock.spec | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/python-filelock.spec b/python-filelock.spec index 706968c..3424646 100644 --- a/python-filelock.spec +++ b/python-filelock.spec @@ -20,10 +20,16 @@ BuildRequires: rpmbuild(macros) >= 1.714 %if %{with python2} BuildRequires: python-modules >= 1:2.7 BuildRequires: python-setuptools +%if %{with tests} +BuildRequires: python-pytest +%endif %endif %if %{with python3} BuildRequires: python3-modules >= 1:3.4 BuildRequires: python3-setuptools +%if %{with tests} +BuildRequires: python3-pytest +%endif %endif Requires: python-modules >= 1:2.7 BuildArch: noarch @@ -63,7 +69,8 @@ komunikacji międzyprocesowej. %py_build %if %{with tests} -%{__python} test.py +PYTHONPATH=$(pwd)/src \ +%{__python} -m pytest tests %endif %endif @@ -71,7 +78,8 @@ komunikacji międzyprocesowej. %py3_build %if %{with tests} -%{__python3} test.py +PYTHONPATH=$(pwd)/src \ +%{__python3} -m pytest tests %endif %endif -- 2.44.0