fix(test): keep CliRunner output colorless in Actions
All checks were successful
CI / lint (push) Successful in 46s
CI / notebooks-smoke (push) Successful in 2m11s
Deploy / changes (push) Successful in 20s
Deploy / notebooks (push) Has been skipped
Deploy / zotero (push) Has been skipped
Deploy / docs (push) Has been skipped
Deploy / api (push) Has been skipped
Deploy / bcda (push) Has been skipped
Deploy / llm (push) Has been skipped
Deploy / mc (push) Has been skipped
Deploy / report (push) Successful in 16s
CI / test (push) Successful in 4m33s
All checks were successful
CI / lint (push) Successful in 46s
CI / notebooks-smoke (push) Successful in 2m11s
Deploy / changes (push) Successful in 20s
Deploy / notebooks (push) Has been skipped
Deploy / zotero (push) Has been skipped
Deploy / docs (push) Has been skipped
Deploy / api (push) Has been skipped
Deploy / bcda (push) Has been skipped
Deploy / llm (push) Has been skipped
Deploy / mc (push) Has been skipped
Deploy / report (push) Successful in 16s
CI / test (push) Successful in 4m33s
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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user