integration tests: add --force-color & set in CI

github actions supports color output, but does not report as a tty.
See https://github.com/actions/runner/issues/241.
This commit is contained in:
Beat Küng
2025-04-04 09:12:53 +02:00
parent abb80ae71e
commit 3d6056411f
5 changed files with 15 additions and 4 deletions
@@ -4,6 +4,7 @@ import os
from enum import Enum
from functools import lru_cache
force_color = False
class color(Enum):
PURPLE = '\033[95m'
@@ -20,7 +21,7 @@ class color(Enum):
def colorize(text: str, c: color) -> str:
if _supports_color():
if force_color or _supports_color():
return str(c.value) + text + color.RESET.value
else:
return text