Update to 7.3.1
This commit is contained in:
parent
ffcb7c76f3
commit
d09782569d
@ -1,42 +0,0 @@
|
|||||||
From 1b81d636e2a086403031909cfb71a397d1ce26de Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ran Benita <ran@unusedvar.com>
|
|
||||||
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
|
|
||||||
|
|
10
pytest.spec
10
pytest.spec
@ -1,5 +1,5 @@
|
|||||||
Name: pytest
|
Name: pytest
|
||||||
%global base_version 7.3.0
|
%global base_version 7.3.1
|
||||||
#global prerelease ...
|
#global prerelease ...
|
||||||
Version: %{base_version}%{?prerelease:~%{prerelease}}
|
Version: %{base_version}%{?prerelease:~%{prerelease}}
|
||||||
Release: 1%{?dist}
|
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
|
# see https://github.com/pytest-dev/pytest/issues/10042#issuecomment-1237132867
|
||||||
Patch: pytest-7.1.3-fix-xfails.patch
|
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,
|
# Remove -s from Python shebang,
|
||||||
# ensure that packages installed with pip to user locations are testable
|
# ensure that packages installed with pip to user locations are testable
|
||||||
# https://bugzilla.redhat.com/2152171
|
# https://bugzilla.redhat.com/2152171
|
||||||
@ -183,6 +180,11 @@ find %{buildroot}%{python3_sitelib} \
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 17 2023 Miro Hrončok <mhroncok@redhat.com> - 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 <mhroncok@redhat.com> - 7.3.0-1
|
* Sun Apr 09 2023 Miro Hrončok <mhroncok@redhat.com> - 7.3.0-1
|
||||||
- Update to 7.3.0
|
- Update to 7.3.0
|
||||||
- Changelog: https://docs.pytest.org/en/stable/changelog.html#pytest-7-3-0-2023-04-08
|
- Changelog: https://docs.pytest.org/en/stable/changelog.html#pytest-7-3-0-2023-04-08
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (pytest-7.3.0.tar.gz) = 9cb84d47529c53037774e89d30da38211ed372ae7ea5c8741d1d35b6299cb2a85be53ee29cd6d6cf9acc332acb3ed21cd95510712115cc670e7f13b06088bce8
|
SHA512 (pytest-7.3.1.tar.gz) = e6c8fcf1449f5e09e33c01ec2ade8812ceb13440324179288b8ca0eeaaffed1e581a65c8acf4c28efe61c19a067e7ceddccc45d8a1582c89259d53fee25ab253
|
||||||
|
Loading…
Reference in New Issue
Block a user