diff --git a/pytest-sugar-0.9.2.tar.gz b/pytest-sugar-0.9.2.tar.gz deleted file mode 100644 index 6093164..0000000 --- a/pytest-sugar-0.9.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fcd87a74b2bce5386d244b49ad60549bfbc4602527797fac167da147983f58ab -size 12677 diff --git a/pytest-sugar-0.9.3.tar.gz b/pytest-sugar-0.9.3.tar.gz new file mode 100644 index 0000000..b9ce581 --- /dev/null +++ b/pytest-sugar-0.9.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1630b5b7ea3624919b73fde37cffb87965c5087a4afab8a43074ff44e0d810c4 +size 12649 diff --git a/pytest4.patch b/pytest4.patch deleted file mode 100644 index 89e3dcb..0000000 --- a/pytest4.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 681461f488260eb8c4c9db4530b9572af058477e Mon Sep 17 00:00:00 2001 -From: Daniel Hahler -Date: Mon, 11 Feb 2019 22:08:41 +0100 -Subject: [PATCH] Fix print_failure for pytest 4.2 - -Fixes https://github.com/Frozenball/pytest-sugar/issues/170. ---- - pytest_sugar.py | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/pytest_sugar.py b/pytest_sugar.py -index 6dbe70f..c479dab 100644 ---- a/pytest_sugar.py -+++ b/pytest_sugar.py -@@ -616,11 +616,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_line('') - self.write_sep("―", msg) diff --git a/python-pytest-sugar.changes b/python-pytest-sugar.changes index 2003c04..2973b08 100644 --- a/python-pytest-sugar.changes +++ b/python-pytest-sugar.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Apr 27 09:30:57 UTC 2020 - Tomáš Chvátal + +- Update to 0.9.3: + * Fix incompatibility with pytest 5.4.0 (thanks @GuillaumeFavelier) +- Drop patch pytest4.patch + ------------------------------------------------------------------- Wed Jul 24 07:09:44 UTC 2019 - Tomáš Chvátal diff --git a/python-pytest-sugar.spec b/python-pytest-sugar.spec index 740a25f..67d1041 100644 --- a/python-pytest-sugar.spec +++ b/python-pytest-sugar.spec @@ -1,7 +1,7 @@ # # spec file for package python-pytest-sugar # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,20 +18,18 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pytest-sugar -Version: 0.9.2 +Version: 0.9.3 Release: 0 Summary: Pretty printer for pytest progress License: BSD-3-Clause -Group: Development/Languages/Python URL: https://github.com/Frozenball/pytest-sugar Source: https://files.pythonhosted.org/packages/source/p/pytest-sugar/pytest-sugar-%{version}.tar.gz -Patch0: pytest4.patch BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module termcolor} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-pytest < 5.0 +Requires: python-pytest Requires: python-termcolor BuildArch: noarch %python_subpackages @@ -41,7 +39,6 @@ pytest-sugar is a plugin for py.test that shows failures and errors instantly an %prep %setup -q -n pytest-sugar-%{version} -%patch0 -p1 %build %python_build