[packages/python-filelock] use use pytest for running tests

atler atler at pld-linux.org
Wed Jan 12 20:29:51 CET 2022


commit 3be7e3a5ca058d6c3dd517b3439f17be9a81b538
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Jan 12 20:29:19 2022 +0100

    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
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-filelock.git/commitdiff/3be7e3a5ca058d6c3dd517b3439f17be9a81b538



More information about the pld-cvs-commit mailing list