Skip to content

Commit 3a26be3

Browse files
howethomasclaude
andcommitted
fix: Disable color output in CLI tests to prevent ANSI escape code issues
Set NO_COLOR=1 environment variable in CliRunner to prevent Rich/Typer from outputting ANSI color codes that split option names like --build into separate strings, causing test assertions to fail on CI. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 14c3d92 commit 3a26be3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/conftest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
@pytest.fixture
1616
def cli_runner() -> CliRunner:
1717
"""Provide a Typer CLI runner for testing commands."""
18-
return CliRunner()
18+
# Set NO_COLOR=1 to disable Rich/Typer color output in tests
19+
# This prevents ANSI codes from splitting option names like --build
20+
return CliRunner(env={"NO_COLOR": "1"})
1921

2022

2123
@pytest.fixture

0 commit comments

Comments
 (0)