commit python-redbaron for openSUSE:Factory
Hello community, here is the log from the commit of package python-redbaron for openSUSE:Factory checked in at 2019-11-03 12:13:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-redbaron (Old) and /work/SRC/openSUSE:Factory/.python-redbaron.new.2990 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-redbaron" Sun Nov 3 12:13:23 2019 rev:4 rq:744754 version:0.9.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-redbaron/python-redbaron.changes 2019-09-07 11:51:06.122293917 +0200 +++ /work/SRC/openSUSE:Factory/.python-redbaron.new.2990/python-redbaron.changes 2019-11-03 12:13:26.836681946 +0100 @@ -1,0 +2,6 @@ +Fri Nov 1 12:53:22 UTC 2019 - Matej Cepl <mcepl@suse.com> + +- Add pytest4.patch to make testsuite pass even with pytest 4 + (gh#PyCQA/redbaron#179) + +------------------------------------------------------------------- New: ---- pytest4.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-redbaron.spec ++++++ --- /var/tmp/diff_new_pack.bDm1hq/_old 2019-11-03 12:13:27.988683585 +0100 +++ /var/tmp/diff_new_pack.bDm1hq/_new 2019-11-03 12:13:27.988683585 +0100 @@ -25,7 +25,7 @@ Group: Development/Languages/Python URL: https://github.com/PyCQA/redbaron Source: https://files.pythonhosted.org/packages/source/r/redbaron/redbaron-%{version}.tar.gz -BuildRequires: %{python_module devel} +Patch0: pytest4.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -33,7 +33,7 @@ BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module baron >= 0.7} -BuildRequires: %{python_module pytest < 4} +BuildRequires: %{python_module pytest} # /SECTION %python_subpackages @@ -45,6 +45,7 @@ %prep %setup -q -n redbaron-%{version} +%autopatch -p1 %build %python_build ++++++ pytest4.patch ++++++
From 812081b7bd8774ceb61016ac37da43107c26eea2 Mon Sep 17 00:00:00 2001 From: Felix Yan <felixonmars@archlinux.org> Date: Mon, 18 Feb 2019 02:15:55 +0800 Subject: [PATCH] Fix tests under pytest 4
Pytest 4 removed support for calling fixtures directly: https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directl... This leads to an error when trying to run the tests: ``` ==================================== ERRORS ==================================== _________________ ERROR collecting tests/test_bounding_box.py __________________ Fixture "red" called directly. Fixtures are not meant to be called directly, but are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information about fixtures, and https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directl... about how to update your code. ``` --- tests/test_bounding_box.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_bounding_box.py b/tests/test_bounding_box.py index f04c6da..e62a1ca 100644 --- a/tests/test_bounding_box.py +++ b/tests/test_bounding_box.py @@ -8,7 +8,6 @@ from redbaron import RedBaron -@pytest.fixture def red(): return RedBaron("""\ @deco @@ -17,6 +16,11 @@ def a(c, d): """) +@pytest.fixture(name="red") +def red_fixture(): + return red() + + fst = red() bounding_boxes = [ (((1, 1), (4, 0)), ((1, 1), (4, 0)), fst),
participants (1)
-
root