From d09782569ddf5beb27aa406033d8f11c231aeed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 17 Apr 2023 13:21:33 +0200 Subject: [PATCH] Update to 7.3.1 --- 1b81d63.patch | 42 ------------------------------------------ pytest.spec | 10 ++++++---- sources | 2 +- 3 files changed, 7 insertions(+), 47 deletions(-) delete mode 100644 1b81d63.patch diff --git a/1b81d63.patch b/1b81d63.patch deleted file mode 100644 index 96e3142..0000000 --- a/1b81d63.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 1b81d636e2a086403031909cfb71a397d1ce26de Mon Sep 17 00:00:00 2001 -From: Ran Benita -Date: Tue, 11 Apr 2023 12:53:13 +0300 -Subject: [PATCH] unittest: add addDuration function for Python 3.12 support - -Fix #10875 - -Without this, fails with - -``` -... -E AttributeError: 'TestCaseFunction' object has no attribute 'addDuration' -... -E RuntimeWarning: TestResult has no addDuration method -``` ---- - changelog/10875.improvement.rst | 1 + - src/_pytest/unittest.py | 3 +++ - 2 files changed, 4 insertions(+) - create mode 100644 changelog/10875.improvement.rst - -diff --git a/changelog/10875.improvement.rst b/changelog/10875.improvement.rst -new file mode 100644 -index 0000000000..eeaf046350 ---- /dev/null -+++ b/changelog/10875.improvement.rst -@@ -0,0 +1 @@ -+Python 3.12 support: fixed ``RuntimeError: TestResult has no addDuration method`` when running ``unittest`` tests. -diff --git a/src/_pytest/unittest.py b/src/_pytest/unittest.py -index c2df986530..c660aa75db 100644 ---- a/src/_pytest/unittest.py -+++ b/src/_pytest/unittest.py -@@ -298,6 +298,9 @@ def addSuccess(self, testcase: "unittest.TestCase") -> None: - def stopTest(self, testcase: "unittest.TestCase") -> None: - pass - -+ def addDuration(self, testcase: "unittest.TestCase", elapsed: float) -> None: -+ pass -+ - def runtest(self) -> None: - from _pytest.debugging import maybe_wrap_pytest_function_for_tracing - diff --git a/pytest.spec b/pytest.spec index ced3681..08ee0a7 100644 --- a/pytest.spec +++ b/pytest.spec @@ -1,5 +1,5 @@ Name: pytest -%global base_version 7.3.0 +%global base_version 7.3.1 #global prerelease ... Version: %{base_version}%{?prerelease:~%{prerelease}} Release: 1%{?dist} @@ -10,9 +10,6 @@ Source: %{pypi_source pytest %{base_version}%{?prerelease}} # see https://github.com/pytest-dev/pytest/issues/10042#issuecomment-1237132867 Patch: pytest-7.1.3-fix-xfails.patch -# unittest: add addDuration function for Python 3.12 support -Patch: https://github.com/pytest-dev/pytest/commit/1b81d63.patch - # Remove -s from Python shebang, # ensure that packages installed with pip to user locations are testable # https://bugzilla.redhat.com/2152171 @@ -183,6 +180,11 @@ find %{buildroot}%{python3_sitelib} \ %changelog +* Mon Apr 17 2023 Miro Hrončok - 7.3.1-1 +- Update to 7.3.1 +- Changelog: https://docs.pytest.org/en/stable/changelog.html#pytest-7-3-1-2023-04-14 +- Fixes: rhbz#2186895 + * Sun Apr 09 2023 Miro Hrončok - 7.3.0-1 - Update to 7.3.0 - Changelog: https://docs.pytest.org/en/stable/changelog.html#pytest-7-3-0-2023-04-08 diff --git a/sources b/sources index f2ac10f..0378ed6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pytest-7.3.0.tar.gz) = 9cb84d47529c53037774e89d30da38211ed372ae7ea5c8741d1d35b6299cb2a85be53ee29cd6d6cf9acc332acb3ed21cd95510712115cc670e7f13b06088bce8 +SHA512 (pytest-7.3.1.tar.gz) = e6c8fcf1449f5e09e33c01ec2ade8812ceb13440324179288b8ca0eeaaffed1e581a65c8acf4c28efe61c19a067e7ceddccc45d8a1582c89259d53fee25ab253