Skip to content

Commit

Permalink
🐛 [-bug] Addressed issues with test stream capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrownell committed May 30, 2024
1 parent ced9263 commit 1395f57
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/dbrownell_Common/TestHelpers/StreamTestHelpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def Replace(
else:
replace_func = lambda _: "<scrubbed duration>"

content = re.sub(
return re.sub(
r"""(?#
Hours )(?P<hours>\d+)(?#
sep )\:(?#
Expand All @@ -60,11 +60,6 @@ def Replace(
content,
)

# Remove any trailing whitespace
content = "\n".join(line.rstrip() for line in content.split("\n"))

return content


# ----------------------------------------------------------------------
def GenerateDoneManagerAndContent(
Expand Down Expand Up @@ -124,6 +119,9 @@ def GenerateDoneManagerAndContent(
keep_seconds=keep_duration_seconds,
)

# Remove any trailing whitespace
content = "\n".join(line.rstrip() for line in content.split("\n"))

assert expected_result is None or final_result == expected_result, (
expected_result,
final_result,
Expand All @@ -144,6 +142,8 @@ def InitializeStreamCapabilities(
):
Capabilities(
columns=120,
is_headless=True,
is_interactive=False,
supports_colors=True,
stream=stream,
no_column_warning=True,
Expand Down

0 comments on commit 1395f57

Please sign in to comment.