Accepting request 817661 from home:mcalabkova:branches:devel:languages:python:pytest
- Update to 1.2.0 * Add limited support for xfail marker (issue #33 / PR #34). * Fix support for pytest 5.4.0+ (issue #30 / PR #32). * Drop support for Python 3.4 as it is EOL (PR #39). - Drop patch pytest5-compat.patch OBS-URL: https://build.opensuse.org/request/show/817661 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-forked?expand=0&rev=9
This commit is contained in:
parent
503049e089
commit
2fe8b2dff5
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1805699ed9c9e60cb7a8179b8d4fa2b8898098e82d229b0825d8095f0f261100
|
||||
size 7308
|
3
pytest-forked-1.2.0.tar.gz
Normal file
3
pytest-forked-1.2.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:65f96334863d9cbe53d21f73e8febc4dd61b8d1fdcac7b487d9af07a5d02a938
|
||||
size 9533
|
@ -1,38 +0,0 @@
|
||||
From 1eb5791e005c0d17622c53d5c3158b5b899e147e Mon Sep 17 00:00:00 2001
|
||||
From: Stanislav Levin <slev@altlinux.org>
|
||||
Date: Thu, 7 May 2020 14:40:19 +0300
|
||||
Subject: [PATCH] Add compatibility with Pytest 5.4.0+
|
||||
|
||||
'getfslineno' has been removed from 'compat' in Pytest [0].
|
||||
However, that function was just the wrapper of
|
||||
'_pytest._code.source.getfslineno'. The latter exists in Pytest
|
||||
since, at least, 3.0.0.
|
||||
|
||||
[0]: https://github.com/pytest-dev/pytest/commit/9c7f1d9b3.
|
||||
|
||||
Fixes: https://github.com/pytest-dev/pytest-forked/issues/30
|
||||
Signed-off-by: Stanislav Levin <slev@altlinux.org>
|
||||
---
|
||||
src/pytest_forked/__init__.py | 9 ++-------
|
||||
1 file changed, 2 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/pytest_forked/__init__.py b/src/pytest_forked/__init__.py
|
||||
index fa0600d..886c4c8 100644
|
||||
--- a/src/pytest_forked/__init__.py
|
||||
+++ b/src/pytest_forked/__init__.py
|
||||
@@ -71,13 +71,8 @@ def runforked():
|
||||
|
||||
|
||||
def report_process_crash(item, result):
|
||||
- try:
|
||||
- from _pytest.compat import getfslineno
|
||||
- except ImportError:
|
||||
- # pytest<4.2
|
||||
- path, lineno = item._getfslineno()
|
||||
- else:
|
||||
- path, lineno = getfslineno(item)
|
||||
+ from _pytest._code.source import getfslineno
|
||||
+ path, lineno = getfslineno(item)
|
||||
info = ("%s:%s: running the test CRASHED with signal %d" %
|
||||
(path, lineno, result.signal))
|
||||
from _pytest import runner
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 29 09:51:58 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
- Update to 1.2.0
|
||||
* Add limited support for xfail marker (issue #33 / PR #34).
|
||||
* Fix support for pytest 5.4.0+ (issue #30 / PR #32).
|
||||
* Drop support for Python 3.4 as it is EOL (PR #39).
|
||||
- Drop patch pytest5-compat.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 12 22:51:08 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
|
@ -18,15 +18,12 @@
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-pytest-forked
|
||||
Version: 1.1.3
|
||||
Version: 1.2.0
|
||||
Release: 0
|
||||
Summary: Run each test in a forked subprocess
|
||||
License: MIT
|
||||
URL: https://github.com/pytest-dev/pytest-forked
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pytest-forked/pytest-forked-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM pytest5-compat.patch gh#pytest-dev/pytest-forked#30 mcepl@suse.com
|
||||
# makes the test suite compatible with pytest5.4.0+
|
||||
Patch0: pytest5-compat.patch
|
||||
BuildRequires: %{python_module pytest >= 3.1.0}
|
||||
BuildRequires: %{python_module setuptools_scm}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
@ -41,7 +38,6 @@ Extraction of pytest-xdist --forked module used for running tests in forked subp
|
||||
|
||||
%prep
|
||||
%setup -q -n pytest-forked-%{version}
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
Loading…
x
Reference in New Issue
Block a user