forked from pool/python-pytest-instafail
Accepting request 679828 from devel:languages:python:pytest
- Update to 0.4.1: * Fixed compatibility with pytest 4.2.0. Thanks @blueyed for the PR. - Drop merged patch pytest42.patch OBS-URL: https://build.opensuse.org/request/show/679828 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-instafail?expand=0&rev=4
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:162bd7c5c196e3b2fe2a5285b69362ee3d9f768d5451413ef914be38df74e3de
|
|
||||||
size 5451
|
|
||||||
3
pytest-instafail-0.4.1.tar.gz
Normal file
3
pytest-instafail-0.4.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:84c87dd708f00d248fb062cdfaf5ba14bf10ce68ce56d46d58f20aa882a33924
|
||||||
|
size 5474
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
From eb4ff5e5cf1811ebde34e070520142647c907726 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Hahler <git@thequod.de>
|
|
||||||
Date: Thu, 14 Feb 2019 17:12:51 +0100
|
|
||||||
Subject: [PATCH] print_failure: fix compatibility with pytest 4.2
|
|
||||||
|
|
||||||
Fixes https://github.com/pytest-dev/pytest-instafail/issues/14.
|
|
||||||
---
|
|
||||||
pytest_instafail.py | 8 +++++---
|
|
||||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pytest_instafail.py b/pytest_instafail.py
|
|
||||||
index 495f901..1a4530c 100644
|
|
||||||
--- a/pytest_instafail.py
|
|
||||||
+++ b/pytest_instafail.py
|
|
||||||
@@ -76,11 +76,13 @@ def print_failure(self, report):
|
|
||||||
self.write_line(line)
|
|
||||||
else:
|
|
||||||
msg = self._getfailureheadline(report)
|
|
||||||
- if not hasattr(report, 'when'):
|
|
||||||
+ # "when" was unset before pytest 4.2 for collection errors.
|
|
||||||
+ when = getattr(report, "when", "collect")
|
|
||||||
+ if when == "collect":
|
|
||||||
msg = "ERROR collecting " + msg
|
|
||||||
- elif report.when == "setup":
|
|
||||||
+ elif when == "setup":
|
|
||||||
msg = "ERROR at setup of " + msg
|
|
||||||
- elif report.when == "teardown":
|
|
||||||
+ elif when == "teardown":
|
|
||||||
msg = "ERROR at teardown of " + msg
|
|
||||||
self.write_sep("_", msg)
|
|
||||||
if not self.config.getvalue("usepdb"):
|
|
||||||
@@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 27 13:51:04 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Update to 0.4.1:
|
||||||
|
* Fixed compatibility with pytest 4.2.0. Thanks @blueyed for the PR.
|
||||||
|
- Drop merged patch pytest42.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Feb 15 09:11:23 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
Fri Feb 15 09:11:23 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -18,14 +18,13 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-pytest-instafail
|
Name: python-pytest-instafail
|
||||||
Version: 0.4.0
|
Version: 0.4.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Pytest Plugin to Show Failures Instantly
|
Summary: Pytest Plugin to Show Failures Instantly
|
||||||
License: BSD-2-Clause
|
License: BSD-2-Clause
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/jpvanhal/pytest-instafail
|
URL: https://github.com/jpvanhal/pytest-instafail
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/pytest-instafail/pytest-instafail-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/pytest-instafail/pytest-instafail-%{version}.tar.gz
|
||||||
Patch0: pytest42.patch
|
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@@ -43,7 +42,6 @@ until the end of test session.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n pytest-instafail-%{version}
|
%setup -q -n pytest-instafail-%{version}
|
||||||
%patch0 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
|||||||
Reference in New Issue
Block a user