From c6ad252984544397e3872fecb7ef3be57facc9bc38cab0e6b660758652a6f4c5 Mon Sep 17 00:00:00 2001 From: Hans-Peter Jansen Date: Wed, 3 Nov 2021 16:00:52 +0000 Subject: [PATCH] Accepting request 928995 from home:pgajdos:python - %check: use %pytest rpm macro OBS-URL: https://build.opensuse.org/request/show/928995 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-random2?expand=0&rev=9 --- python-random2.changes | 5 +++++ python-random2.spec | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/python-random2.changes b/python-random2.changes index 7e177f0..d69fac9 100644 --- a/python-random2.changes +++ b/python-random2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Nov 3 10:52:10 UTC 2021 - pgajdos@suse.com + +- %check: use %pytest rpm macro + ------------------------------------------------------------------- Sat Apr 17 06:37:03 UTC 2021 - Christophe Giboudeaux diff --git a/python-random2.spec b/python-random2.spec index 23e50ee..7411d82 100644 --- a/python-random2.spec +++ b/python-random2.spec @@ -1,7 +1,7 @@ # # spec file for package python-random2 # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # Copyright (c) 2013 LISA GmbH, Bingen, Germany. # # All modifications and additions to the file contributed by third parties @@ -27,6 +27,7 @@ URL: https://pypi.python.org/pypi/random2 Source: https://files.pythonhosted.org/packages/source/r/random2/random2-%{version}.zip # PATCH-FIX-UPSTREAM -- python3.9.patch Origin: Debian Patch0: python3.9.patch +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -57,7 +58,9 @@ adjusted. This package fixes that. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%python_exec setup.py test +# see tests.test_suite +classes='WichmannHill_TestBasicOps or MersenneTwister_TestBasicOps or TestDistributions or TestModule' +%pytest -k "$classes" src/tests.py %files %{python_files} %doc CHANGES.txt README.txt PKG-INFO