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

Also, add a Python 3.12 CI job (isort_c9s already contains that as well).

Resolves: RHEL-22803
This commit is contained in:
Miro Hrončok 2024-01-26 11:36:50 +01:00
parent 29eb590e45
commit 345517d213
2 changed files with 16 additions and 2 deletions

View File

@ -63,13 +63,20 @@ BuildRequires: python3dist(tox-current-env) >= 0.0.6
BuildRequires: python3dist(wheel)
BuildRequires: (python3dist(tomli) if python3 < 3.11)
# RHEL 9: We also run pytest with Python 3.11
# RHEL 9: We also run pytest with Python 3.11 and 3.12
BuildRequires: python3.11dist(pytest)
BuildRequires: python3.11dist(pyyaml)
BuildRequires: python3.11dist(packaging)
BuildRequires: python3.11dist(pip)
BuildRequires: python3.11dist(setuptools)
BuildRequires: python3.11dist(wheel)
BuildRequires: python3.12dist(pytest)
BuildRequires: python3.12dist(pyyaml)
BuildRequires: python3.12dist(packaging)
BuildRequires: python3.12dist(pip)
BuildRequires: python3.12dist(setuptools)
BuildRequires: python3.12dist(wheel)
%endif
# We build on top of those:
@ -156,7 +163,11 @@ export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856
%pytest -vv --doctest-modules %{?with_pytest_xdist:-n auto} %{!?with_tox_tests:-k "not tox"}
# RHEL 9 only:
%global __pytest %{__pytest}-3.11
%global __pytest pytest-3.11
%pytest -vv --doctest-modules -k "not tox"
# RHEL 9 only:
%global __pytest pytest-3.12
%pytest -vv --doctest-modules -k "not tox"
# brp-compress is provided as an argument to get the right directory macro expansion

View File

@ -116,6 +116,9 @@
- mistune_311:
dir: .
run: ./mocktest.sh python-mistune --define 'python3_pkgversion 3.11'
- mistune_312:
dir: .
run: ./mocktest.sh python-mistune --define 'python3_pkgversion 3.12'
required_packages:
- 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm'
- 'https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm'