From e9e6f852d1e7d1a168accf018af0164fc4154c46 Mon Sep 17 00:00:00 2001 From: kert Date: Mon, 16 Nov 2026 14:24:36 -0500 Subject: [PATCH] fix(test): keep CliRunner output colorless in Actions Typer forces a color terminal when GITHUB_ACTIONS is set. Rich then inserts an ANSI code between the dashes of --option, so assertions that look for the option name fail on the runner and pass locally. --- tests/conftest.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index cbc93a8..53a32b0 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -10,11 +10,17 @@ Fixtures are organized by domain: from __future__ import annotations +import os import re import shutil import tempfile from pathlib import Path +# Gitea Actions sets GITHUB_ACTIONS. Typer then forces a color terminal, and +# Rich's option highlighter puts an ANSI code between the two dashes of +# ``--option``. A dumb TERM keeps CliRunner output colorless on every worker. +os.environ["TERM"] = "dumb" + import polars as pl import pytest