From fb0ff80d4dd5479d8f255dd1e1ad15290442f654003bb93ae100a0bdaeb7050c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 27 Jul 2023 07:55:07 +0000 Subject: [PATCH] Accepting request 1101008 from home:mcalabkova:branches:devel:languages:python:pytest - Add pytest74.patch to fix tests with pytest 7.4+ OBS-URL: https://build.opensuse.org/request/show/1101008 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-html5lib?expand=0&rev=55 --- pytest74.patch | 26 ++++++++++++++++++++++++++ python-html5lib.changes | 5 +++++ python-html5lib.spec | 2 ++ 3 files changed, 33 insertions(+) create mode 100644 pytest74.patch diff --git a/pytest74.patch b/pytest74.patch new file mode 100644 index 0000000..656abd0 --- /dev/null +++ b/pytest74.patch @@ -0,0 +1,26 @@ +Index: html5lib-1.1/html5lib/tests/tokenizer.py +=================================================================== +--- html5lib-1.1.orig/html5lib/tests/tokenizer.py ++++ html5lib-1.1/html5lib/tests/tokenizer.py +@@ -246,7 +246,7 @@ class TokenizerTest(pytest.Item): + def repr_failure(self, excinfo): + traceback = excinfo.traceback + ntraceback = traceback.cut(path=__file__) +- excinfo.traceback = ntraceback.filter() ++ excinfo.traceback = ntraceback.filter(excinfo) + + return excinfo.getrepr(funcargs=True, + showlocals=False, +Index: html5lib-1.1/html5lib/tests/tree_construction.py +=================================================================== +--- html5lib-1.1.orig/html5lib/tests/tree_construction.py ++++ html5lib-1.1/html5lib/tests/tree_construction.py +@@ -135,7 +135,7 @@ class ParserTest(pytest.Item): + def repr_failure(self, excinfo): + traceback = excinfo.traceback + ntraceback = traceback.cut(path=__file__) +- excinfo.traceback = ntraceback.filter() ++ excinfo.traceback = ntraceback.filter(excinfo) + + return excinfo.getrepr(funcargs=True, + showlocals=False, diff --git a/python-html5lib.changes b/python-html5lib.changes index 3eef0a8..07f8610 100644 --- a/python-html5lib.changes +++ b/python-html5lib.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 27 07:50:37 UTC 2023 - Markéta Machová + +- Add pytest74.patch to fix tests with pytest 7.4+ + ------------------------------------------------------------------- Fri Apr 21 12:26:16 UTC 2023 - Dirk Müller diff --git a/python-html5lib.spec b/python-html5lib.spec index 358fce3..0207202 100644 --- a/python-html5lib.spec +++ b/python-html5lib.spec @@ -29,6 +29,8 @@ Source: https://files.pythonhosted.org/packages/source/h/html5lib/html5l Patch0: pytest6.patch # https://github.com/html5lib/html5lib-python/issues/541 Patch1: python-html5lib-no-mock.patch +# PATCH-FIX-UPSTREAM https://github.com/html5lib/html5lib-python/pull/570 adapt testsuite to changes in pytest 7.4 +Patch2: pytest74.patch BuildRequires: %{python_module Genshi} BuildRequires: %{python_module lxml} BuildRequires: %{python_module pytest >= 4.0}