From c1cdfe06eb01b3af7b5004b0ac2aee7aa3223abb67c5051293eb648b84f80854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Wed, 9 Dec 2020 11:53:24 +0000 Subject: [PATCH] Accepting request 854170 from home:bnavigator:branches:devel:languages:python:pytest - Fix test failure gh#astropy/pytest-filter-subpackage#3 fix-doctestplus-count.patch OBS-URL: https://build.opensuse.org/request/show/854170 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-filter-subpackage?expand=0&rev=3 --- fix-doctestplus-count.patch | 13 +++++++++++++ python-pytest-filter-subpackage.changes | 6 ++++++ python-pytest-filter-subpackage.spec | 11 ++++++++--- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 fix-doctestplus-count.patch diff --git a/fix-doctestplus-count.patch b/fix-doctestplus-count.patch new file mode 100644 index 0000000..0ede4e0 --- /dev/null +++ b/fix-doctestplus-count.patch @@ -0,0 +1,13 @@ +Index: pytest-filter-subpackage-0.1.1/tests/test_filter_subpackage.py +=================================================================== +--- pytest-filter-subpackage-0.1.1.orig/tests/test_filter_subpackage.py ++++ pytest-filter-subpackage-0.1.1/tests/test_filter_subpackage.py +@@ -14,7 +14,7 @@ def test_with_rst(testdir, testpackage): + doctest_plus = enabled + """) + reprec = testdir.inline_run('--doctest-rst') +- reprec.assertoutcome(passed=8, failed=3) ++ reprec.assertoutcome(passed=7, failed=3) + + + def test_flag_single_subpackage(testdir, testpackage): diff --git a/python-pytest-filter-subpackage.changes b/python-pytest-filter-subpackage.changes index 41c7421..b0eb39e 100644 --- a/python-pytest-filter-subpackage.changes +++ b/python-pytest-filter-subpackage.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Dec 9 00:01:05 UTC 2020 - Benjamin Greiner + +- Fix test failure gh#astropy/pytest-filter-subpackage#3 + fix-doctestplus-count.patch + ------------------------------------------------------------------- Mon Mar 16 08:37:56 UTC 2020 - Tomáš Chvátal diff --git a/python-pytest-filter-subpackage.spec b/python-pytest-filter-subpackage.spec index 9e7ea63..1ec0aa4 100644 --- a/python-pytest-filter-subpackage.spec +++ b/python-pytest-filter-subpackage.spec @@ -25,9 +25,13 @@ Summary: Pytest plugin for filtering based on sub-packages License: BSD-3-Clause URL: https://github.com/astropy/pytest-filter-subpackage Source: https://files.pythonhosted.org/packages/source/p/pytest-filter-subpackage/pytest-filter-subpackage-%{version}.tar.gz +# PATCH-FIX-UPSTREAM -- fix gh#astropy/pytest-filter-subpackage#3 +Patch0: fix-doctestplus-count.patch BuildRequires: %{python_module pytest >= 3.0} -BuildRequires: %{python_module pytest-doctestplus} +# Patch0 is for the change from doctestplus 0.5 to 0.6 +BuildRequires: %{python_module pytest-doctestplus >= 0.6} BuildRequires: %{python_module setuptools >= 30.3} +BuildRequires: %{python_module setuptools_scm} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-pytest >= 3.0 @@ -39,7 +43,7 @@ This package contains a simple plugin for the `pytest`_ framework that provides shortcut to testing all code and documentation for a given sub-package. %prep -%setup -q -n pytest-filter-subpackage-%{version} +%autosetup -p1 -n pytest-filter-subpackage-%{version} %build %python_build @@ -54,6 +58,7 @@ shortcut to testing all code and documentation for a given sub-package. %files %{python_files} %doc README.rst CHANGES.rst %license LICENSE.rst -%{python_sitelib}/* +%{python_sitelib}/pytest_filter_subpackage +%{python_sitelib}/pytest_filter_subpackage-%{version}*-info %changelog