diff --git a/pytest5.patch b/pytest5.patch new file mode 100644 index 0000000..dcf1dc2 --- /dev/null +++ b/pytest5.patch @@ -0,0 +1,13 @@ +Index: pytest-instafail-0.4.1.post0/test_instafail.py +=================================================================== +--- pytest-instafail-0.4.1.post0.orig/test_instafail.py ++++ pytest-instafail-0.4.1.post0/test_instafail.py +@@ -241,7 +241,7 @@ class TestInstafailingTerminalReporter(o + ]) + if not option.quiet: + result.stdout.fnmatch_lines([ +- "collected 0 items / 1 errors", ++ "collected 0 items / 1 error*", + ]) + + def test_print_stacktrace_once_with_pdb(self, testdir, request, option): diff --git a/python-pytest-instafail.changes b/python-pytest-instafail.changes index 1bd7060..86b9a98 100644 --- a/python-pytest-instafail.changes +++ b/python-pytest-instafail.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 5 08:24:53 UTC 2020 - Tomáš Chvátal + +- Add patch fixing testing with new pytest: + * pytest5.patch + ------------------------------------------------------------------- Mon Nov 18 07:55:29 UTC 2019 - Tomáš Chvátal diff --git a/python-pytest-instafail.spec b/python-pytest-instafail.spec index 7cbe884..9cf90d8 100644 --- a/python-pytest-instafail.spec +++ b/python-pytest-instafail.spec @@ -1,7 +1,7 @@ # # spec file for package python-pytest-instafail # -# Copyright (c) 2019 SUSE LLC. +# 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 @@ -22,9 +22,9 @@ Version: 0.4.1.post0 Release: 0 Summary: Pytest Plugin to Show Failures Instantly License: BSD-2-Clause -Group: Development/Languages/Python URL: https://github.com/jpvanhal/pytest-instafail Source: https://files.pythonhosted.org/packages/source/p/pytest-instafail/pytest-instafail-%{version}.tar.gz +Patch0: pytest5.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -42,6 +42,7 @@ until the end of test session. %prep %setup -q -n pytest-instafail-%{version} +%patch0 -p1 %build %python_build @@ -52,7 +53,7 @@ until the end of test session. %check export PYTHONDONTWRITEBYTECODE=1 -%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} -v +%pytest %files %{python_files} %doc CHANGES.rst README.rst