From 345517d213b984053aa1b5f5393b96f3e848dfdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 26 Jan 2024 11:36:50 +0100 Subject: [PATCH] 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 --- pyproject-rpm-macros.spec | 15 +++++++++++++-- tests/tests.yml | 3 +++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/pyproject-rpm-macros.spec b/pyproject-rpm-macros.spec index 0aedec6..9f2247b 100644 --- a/pyproject-rpm-macros.spec +++ b/pyproject-rpm-macros.spec @@ -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 diff --git a/tests/tests.yml b/tests/tests.yml index e6d4dee..8bacbe3 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -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'