Run unit tests in %check

This commit is contained in:
Maxwell G 2023-10-20 01:46:43 +00:00
parent 11f139716a
commit 8b34027242
No known key found for this signature in database
GPG Key ID: F79E4E25E8C661F8

View File

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