14
0

Accepting request 1239029 from home:mcalabkova:branches:devel:languages:python

- Add pygments.patch to fix non-skipped tests with Pygments 2.19

OBS-URL: https://build.opensuse.org/request/show/1239029
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-stack-data?expand=0&rev=21
This commit is contained in:
2025-01-20 13:46:56 +00:00
committed by Git OBS Bridge
parent a75ff44a9d
commit 3b6d30557a
3 changed files with 34 additions and 3 deletions

24
pygments.patch Normal file
View File

@@ -0,0 +1,24 @@
Index: stack_data-0.6.3/tests/test_core.py
===================================================================
--- stack_data-0.6.3.orig/tests/test_core.py
+++ stack_data-0.6.3/tests/test_core.py
@@ -573,8 +573,8 @@ def test_absolute_filename():
[
r".c { color: #(999999|ababab); font-style: italic }",
r".err { color: #a61717; background-color: #e3d2d2 }",
- r".c-ExecutingNode { color: #(999999|ababab); font-style: italic; background-color: #ffff00 }",
- r".err-ExecutingNode { color: #a61717; background-color: #ffff00 }",
+ r".c-ExecutingNode { color: #(999999|ababab); font-style: italic; background-color: #(ffff00|FF0) }",
+ r".err-ExecutingNode { color: #A61717; background-color: #(ffff00|FF0) }",
]
)
def test_executing_style_defs(expected):
@@ -582,7 +582,7 @@ def test_executing_style_defs(expected):
formatter = HtmlFormatter(style=style)
style_defs = formatter.get_style_defs()
- assert re.search(expected, style_defs)
+ assert re.search(expected, style_defs, re.IGNORECASE)
def test_example():