Run tests with Python 3.11 in %check (RHEL 9 specific)

Related: rhbz#2208971
This commit is contained in:
Miro Hrončok 2023-06-07 09:55:01 +02:00
parent ab6c5538e5
commit 5f5038f73e
1 changed files with 12 additions and 0 deletions

View File

@ -62,6 +62,14 @@ BuildRequires: python3dist(tox-current-env) >= 0.0.6
%endif
BuildRequires: python3dist(wheel)
BuildRequires: (python3dist(tomli) if python3 < 3.11)
# RHEL 9: We also run pytest with Python 3.11
BuildRequires: python3.11dist(pytest)
BuildRequires: python3.11dist(pyyaml)
BuildRequires: python3.11dist(packaging)
BuildRequires: python3.11dist(pip)
BuildRequires: python3.11dist(setuptools)
BuildRequires: python3.11dist(wheel)
%endif
# We build on top of those:
@ -137,6 +145,10 @@ test "$signature1" != ""
export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856356
%pytest -vv --doctest-modules %{?with_pytest_xdist:-n auto} %{!?with_tox_tests:-k "not tox"}
# RHEL 9 only:
%global __pytest %{__pytest}-3.11
%pytest -vv --doctest-modules -k "not tox"
# brp-compress is provided as an argument to get the right directory macro expansion
%{python3} compare_mandata.py -f %{_rpmconfigdir}/brp-compress
%endif