From 8b34027242bb9c2bbd0c372019de8357a64b94eb Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Fri, 20 Oct 2023 01:46:43 +0000 Subject: [PATCH] Run unit tests in %check --- python-resolvelib.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/python-resolvelib.spec b/python-resolvelib.spec index 6efbe0a..cb158df 100644 --- a/python-resolvelib.spec +++ b/python-resolvelib.spec @@ -1,6 +1,7 @@ # Created by pyp2rpm-3.3.6 %global pypi_name resolvelib %global forgeurl https://github.com/sarugaku/resolvelib +%bcond tests 1 Name: python-%{pypi_name} Version: 1.0.1 @@ -35,10 +36,13 @@ Summary: %{summary} %prep %autosetup %{forgesetupargs} +# Use already packaged json5 instead of commentjson +sed -i 's|commentjson|json5|' \ + setup.cfg tests/functional/cocoapods/test_resolvers_cocoapods.py %generate_buildrequires -%pyproject_buildrequires +%pyproject_buildrequires %{?with_tests:-x test} %build @@ -49,6 +53,9 @@ Summary: %{summary} %pyproject_install %pyproject_save_files %{pypi_name} +%check +%pytest -v + %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE