Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pytest for openSUSE:Factory checked in at 2023-01-15 17:57:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pytest (Old) and /work/SRC/openSUSE:Factory/.python-pytest.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest" Sun Jan 15 17:57:49 2023 rev:72 rq:1056778 version:7.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pytest/python-pytest.changes 2023-01-06 17:04:59.131989249 +0100 +++ /work/SRC/openSUSE:Factory/.python-pytest.new.32243/python-pytest.changes 2023-01-15 17:57:53.502105182 +0100 @@ -1,0 +2,6 @@ +Wed Jan 4 10:15:15 UTC 2023 - Daniel Garcia <daniel.gar...@suse.com> + +- Add fix-tests-pygments-2.14.0.patch to make it work with pygments 2.14.0 + gh#pytest-dev/pytest#10632 + +------------------------------------------------------------------- New: ---- fix-tests-pygments-2.14.0.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pytest.spec ++++++ --- /var/tmp/diff_new_pack.4yJKjl/_old 2023-01-15 17:57:54.242109574 +0100 +++ /var/tmp/diff_new_pack.4yJKjl/_new 2023-01-15 17:57:54.246109598 +0100 @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -41,6 +41,8 @@ Source: https://files.pythonhosted.org/packages/source/p/pytest/pytest-%{version}.tar.gz # PATCH-FIX-UPSTREAM fix-test-raising-repr.patch gh#pytest-dev/pytest#10473 Patch: fix-test-raising-repr.patch +# PATCH-FIX-UPSTREAM fix-tests-pygments-2.14.0.patch gh#pytest-dev/pytest#10632 +Patch1: fix-tests-pygments-2.14.0.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module setuptools_scm >= 6} BuildRequires: %{python_module setuptools} ++++++ fix-tests-pygments-2.14.0.patch ++++++ >From 61f70a5a759bd22457c89f3564c0cfbb91b0cd8d Mon Sep 17 00:00:00 2001 From: Daniel Garcia Moreno <daniel.gar...@suse.com> Date: Wed, 4 Jan 2023 09:29:53 +0100 Subject: [PATCH] Fix tests pygments 2.14.0 Fix https://github.com/pytest-dev/pytest/issues/10630 --- testing/conftest.py | 1 + testing/io/test_terminalwriter.py | 2 +- testing/test_terminal.py | 24 ++++++++++++------------ 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/testing/conftest.py b/testing/conftest.py index 107aad86b..8a9816799 100644 --- a/testing/conftest.py +++ b/testing/conftest.py @@ -157,6 +157,7 @@ def color_mapping(): "number": "\x1b[94m", "str": "\x1b[33m", "print": "\x1b[96m", + "endline": "\x1b[90m\x1b[39;49;00m", } RE_COLORS = {k: re.escape(v) for k, v in COLORS.items()} diff --git a/testing/io/test_terminalwriter.py b/testing/io/test_terminalwriter.py index 6fe718b53..b5a04a99f 100644 --- a/testing/io/test_terminalwriter.py +++ b/testing/io/test_terminalwriter.py @@ -254,7 +254,7 @@ class TestTerminalWriterLineWidth: pytest.param( True, True, - "{kw}assert{hl-reset} {number}0{hl-reset}\n", + "{kw}assert{hl-reset} {number}0{hl-reset}{endline}\n", id="with markup and code_highlight", ), pytest.param( diff --git a/testing/test_terminal.py b/testing/test_terminal.py index 9de9a85f0..453f18323 100644 --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -1265,14 +1265,14 @@ def test_color_yes(pytester: Pytester, color_mapping) -> None: "=*= FAILURES =*=", "{red}{bold}_*_ test_this _*_{reset}", "", - " {kw}def{hl-reset} {function}test_this{hl-reset}():", - "> fail()", + " {kw}def{hl-reset} {function}test_this{hl-reset}():{endline}", + "> fail(){endline}", "", "{bold}{red}test_color_yes.py{reset}:5: ", "_ _ * _ _*", "", - " {kw}def{hl-reset} {function}fail{hl-reset}():", - "> {kw}assert{hl-reset} {number}0{hl-reset}", + " {kw}def{hl-reset} {function}fail{hl-reset}():{endline}", + "> {kw}assert{hl-reset} {number}0{hl-reset}{endline}", "{bold}{red}E assert 0{reset}", "", "{bold}{red}test_color_yes.py{reset}:2: AssertionError", @@ -1292,9 +1292,9 @@ def test_color_yes(pytester: Pytester, color_mapping) -> None: "=*= FAILURES =*=", "{red}{bold}_*_ test_this _*_{reset}", "{bold}{red}test_color_yes.py{reset}:5: in test_this", - " fail()", + " fail(){endline}", "{bold}{red}test_color_yes.py{reset}:2: in fail", - " {kw}assert{hl-reset} {number}0{hl-reset}", + " {kw}assert{hl-reset} {number}0{hl-reset}{endline}", "{bold}{red}E assert 0{reset}", "{red}=*= {red}{bold}1 failed{reset}{red} in *s{reset}{red} =*={reset}", ] @@ -2472,8 +2472,8 @@ class TestCodeHighlight: result.stdout.fnmatch_lines( color_mapping.format_for_fnmatch( [ - " {kw}def{hl-reset} {function}test_foo{hl-reset}():", - "> {kw}assert{hl-reset} {number}1{hl-reset} == {number}10{hl-reset}", + " {kw}def{hl-reset} {function}test_foo{hl-reset}():{endline}", + "> {kw}assert{hl-reset} {number}1{hl-reset} == {number}10{hl-reset}{endline}", "{bold}{red}E assert 1 == 10{reset}", ] ) @@ -2494,9 +2494,9 @@ class TestCodeHighlight: result.stdout.fnmatch_lines( color_mapping.format_for_fnmatch( [ - " {kw}def{hl-reset} {function}test_foo{hl-reset}():", + " {kw}def{hl-reset} {function}test_foo{hl-reset}():{endline}", " {print}print{hl-reset}({str}'''{hl-reset}{str}{hl-reset}", - "> {str} {hl-reset}{str}'''{hl-reset}); {kw}assert{hl-reset} {number}0{hl-reset}", + "> {str} {hl-reset}{str}'''{hl-reset}); {kw}assert{hl-reset} {number}0{hl-reset}{endline}", "{bold}{red}E assert 0{reset}", ] ) @@ -2517,8 +2517,8 @@ class TestCodeHighlight: result.stdout.fnmatch_lines( color_mapping.format_for_fnmatch( [ - " {kw}def{hl-reset} {function}test_foo{hl-reset}():", - "> {kw}assert{hl-reset} {number}1{hl-reset} == {number}10{hl-reset}", + " {kw}def{hl-reset} {function}test_foo{hl-reset}():{endline}", + "> {kw}assert{hl-reset} {number}1{hl-reset} == {number}10{hl-reset}{endline}", "{bold}{red}E assert 1 == 10{reset}", ] ) -- 2.39.0