From 1395f572ded95b1398c97365b5f3e25511f1d7c1 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Thu, 30 May 2024 15:29:17 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20[-bug]=20Addressed=20issues=20wi?= =?UTF-8?q?th=20test=20stream=20capabilities?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TestHelpers/StreamTestHelpers.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dbrownell_Common/TestHelpers/StreamTestHelpers.py b/src/dbrownell_Common/TestHelpers/StreamTestHelpers.py index 0fe30d6..901446a 100644 --- a/src/dbrownell_Common/TestHelpers/StreamTestHelpers.py +++ b/src/dbrownell_Common/TestHelpers/StreamTestHelpers.py @@ -48,7 +48,7 @@ def Replace( else: replace_func = lambda _: "" - content = re.sub( + return re.sub( r"""(?# Hours )(?P\d+)(?# sep )\:(?# @@ -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( @@ -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, @@ -144,6 +142,8 @@ def InitializeStreamCapabilities( ): Capabilities( columns=120, + is_headless=True, + is_interactive=False, supports_colors=True, stream=stream, no_column_warning=True,