Skip to content

Commit

Permalink
try fix linux bash tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bckohan committed Feb 4, 2025
1 parent 2425d23 commit 6f95462
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/shellcompletion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ def read_all_from_fd_with_timeout(fd, timeout=3):

def scrub(output: str) -> str:
"""Scrub control code characters and ansi escape sequences for terminal colors from output"""
return re.sub(r"\x1B\[[0-?]*[ -/]*[@-~]", "", output, flags=re.IGNORECASE).replace(
"\t", ""
return (
re.sub(r"\x1B\[[0-?]*[ -/]*[@-~]", "", output, flags=re.IGNORECASE)
.replace("\t", "")
.replace("\x08", "")
)


Expand Down

0 comments on commit 6f95462

Please sign in to comment.