Files
spec-kit/tests/conftest.py
T

11 lines
268 B
Python
Raw Permalink Normal View History

"""Shared test helpers for the Spec Kit test suite."""
import re
_ANSI_ESCAPE_RE = re.compile(r"\x1b\[[0-?]*[ -/]*[@-~]")
def strip_ansi(text: str) -> str:
"""Remove ANSI escape codes from Rich-formatted CLI output."""
return _ANSI_ESCAPE_RE.sub("", text)