forked from pool/python-ansi2html
- Add opensuse-test.patch making the tests work even with
versioned executables in the testing environment (i.e., before the alts scriptlets kick in). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ansi2html?expand=0&rev=19
This commit is contained in:
34
opensuse-test.patch
Normal file
34
opensuse-test.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
tests/test_ansi2html.py | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: ansi2html-1.9.2/tests/test_ansi2html.py
|
||||
===================================================================
|
||||
--- ansi2html-1.9.2.orig/tests/test_ansi2html.py 2024-06-22 19:22:24.000000000 +0200
|
||||
+++ ansi2html-1.9.2/tests/test_ansi2html.py 2025-06-17 22:27:11.354092953 +0200
|
||||
@@ -50,6 +50,7 @@
|
||||
|
||||
class TestAnsi2HTML:
|
||||
maxDiff = None
|
||||
+ cmd_exe = "ansi2html-" + '.'.join([str(x) for x in sys.version_info[:2]])
|
||||
|
||||
def test_linkify(self) -> None:
|
||||
ansi = "http://threebean.org#foobar"
|
||||
@@ -465,7 +466,7 @@
|
||||
assert target in html
|
||||
|
||||
def test_command_script(self) -> None:
|
||||
- result = run(["ansi2html", "--version"], check=True)
|
||||
+ result = run([self.cmd_exe, "--version"], check=True)
|
||||
assert result.returncode == 0
|
||||
|
||||
def test_command_input_output_encoding(self) -> None:
|
||||
@@ -480,7 +481,7 @@
|
||||
|
||||
with Popen(
|
||||
[
|
||||
- "ansi2html",
|
||||
+ self.cmd_exe,
|
||||
"--inline",
|
||||
f"--input-encoding={input_encoding}",
|
||||
f"--output-encoding={output_encoding}",
|
||||
Reference in New Issue
Block a user