Skip to content

Commit 18bb65d

Browse files
mnriemCopilot
andcommitted
fix: strip ANSI codes in ai-skills help text test
The Rich/Typer CLI injects ANSI escape codes into option names in --help output, causing plain string matching to fail. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 998b779 commit 18bb65d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/test_ai_skills.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- CLI validation: --ai-skills requires --ai
1111
"""
1212

13+
import re
1314
import pytest
1415
import tempfile
1516
import shutil
@@ -626,5 +627,6 @@ def test_ai_skills_flag_appears_in_help(self):
626627
runner = CliRunner()
627628
result = runner.invoke(app, ["init", "--help"])
628629

629-
assert "--ai-skills" in result.output
630-
assert "agent skills" in result.output.lower()
630+
plain = re.sub(r'\x1b\[[0-9;]*m', '', result.output)
631+
assert "--ai-skills" in plain
632+
assert "agent skills" in plain.lower()

0 commit comments

Comments
 (0)