Skip to content

Commit b8b0d9a

Browse files
committed
Update python-pytest-forked to rev 4 via SR 803983
https://build.opensuse.org/request/show/803983 by user mcepl + maxlin_factory - Add pytest5-compat.patch to make the test suite compatible with pytest 5.4.0+ (gh#pytest-dev/pytest-forked#32)
1 parent fb5a71e commit b8b0d9a

File tree

5 files changed

+58
-1
lines changed

5 files changed

+58
-1
lines changed
59 Bytes
Binary file not shown.

packages/p/python-pytest-forked/.rev

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,13 @@
2929
* New marker `pytest.mark.forked` to fork before individual tests.</comment>
3030
<requestid>745443</requestid>
3131
</revision>
32+
<revision rev="4" vrev="2">
33+
<srcmd5>00e5855ed7baa4835767a98c743bea36</srcmd5>
34+
<version>1.1.3</version>
35+
<time>1590649525</time>
36+
<user>maxlin_factory</user>
37+
<comment>- Add pytest5-compat.patch to make the test suite compatible
38+
with pytest 5.4.0+ (gh#pytest-dev/pytest-forked#32)</comment>
39+
<requestid>803983</requestid>
40+
</revision>
3241
</revisionlist>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
From 1eb5791e005c0d17622c53d5c3158b5b899e147e Mon Sep 17 00:00:00 2001
2+
From: Stanislav Levin <[email protected]>
3+
Date: Thu, 7 May 2020 14:40:19 +0300
4+
Subject: [PATCH] Add compatibility with Pytest 5.4.0+
5+
6+
'getfslineno' has been removed from 'compat' in Pytest [0].
7+
However, that function was just the wrapper of
8+
'_pytest._code.source.getfslineno'. The latter exists in Pytest
9+
since, at least, 3.0.0.
10+
11+
[0]: https://github.com/pytest-dev/pytest/commit/9c7f1d9b3.
12+
13+
Fixes: https://github.com/pytest-dev/pytest-forked/issues/30
14+
Signed-off-by: Stanislav Levin <[email protected]>
15+
---
16+
src/pytest_forked/__init__.py | 9 ++-------
17+
1 file changed, 2 insertions(+), 7 deletions(-)
18+
19+
diff --git a/src/pytest_forked/__init__.py b/src/pytest_forked/__init__.py
20+
index fa0600d..886c4c8 100644
21+
--- a/src/pytest_forked/__init__.py
22+
+++ b/src/pytest_forked/__init__.py
23+
@@ -71,13 +71,8 @@ def runforked():
24+
25+
26+
def report_process_crash(item, result):
27+
- try:
28+
- from _pytest.compat import getfslineno
29+
- except ImportError:
30+
- # pytest<4.2
31+
- path, lineno = item._getfslineno()
32+
- else:
33+
- path, lineno = getfslineno(item)
34+
+ from _pytest._code.source import getfslineno
35+
+ path, lineno = getfslineno(item)
36+
info = ("%s:%s: running the test CRASHED with signal %d" %
37+
(path, lineno, result.signal))
38+
from _pytest import runner

packages/p/python-pytest-forked/python-pytest-forked.changes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
-------------------------------------------------------------------
2+
Tue May 12 22:51:08 UTC 2020 - Matej Cepl <[email protected]>
3+
4+
- Add pytest5-compat.patch to make the test suite compatible
5+
with pytest 5.4.0+ (gh#pytest-dev/pytest-forked#32)
6+
17
-------------------------------------------------------------------
28
Tue Nov 5 10:56:22 UTC 2019 - Tomáš Chvátal <[email protected]>
39

packages/p/python-pytest-forked/python-pytest-forked.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# spec file for package python-pytest-forked
33
#
4-
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
4+
# Copyright (c) 2020 SUSE LLC
55
#
66
# All modifications and additions to the file contributed by third parties
77
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,6 +24,9 @@ Summary: Run each test in a forked subprocess
2424
License: MIT
2525
URL: https://github.com/pytest-dev/pytest-forked
2626
Source: https://files.pythonhosted.org/packages/source/p/pytest-forked/pytest-forked-%{version}.tar.gz
27+
# PATCH-FIX-UPSTREAM pytest5-compat.patch gh#pytest-dev/pytest-forked#30 [email protected]
28+
# makes the test suite compatible with pytest5.4.0+
29+
Patch0: pytest5-compat.patch
2730
BuildRequires: %{python_module pytest >= 3.1.0}
2831
BuildRequires: %{python_module setuptools_scm}
2932
BuildRequires: %{python_module setuptools}
@@ -38,6 +41,7 @@ Extraction of pytest-xdist --forked module used for running tests in forked subp
3841

3942
%prep
4043
%setup -q -n pytest-forked-%{version}
44+
%autopatch -p1
4145

4246
%build
4347
%python_build

0 commit comments

Comments
 (0)