Skip to content

Commit

Permalink
Check stderr and stdout output order
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Feb 21, 2024
1 parent 2bf60f0 commit 411b993
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions click_extra/tests/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ def debug_output():
assert result.exit_code == 0

assert re.fullmatch(
default_debug_colored_logging
+ default_debug_colored_version_details
+ default_debug_colored_log_end,
result.stderr,
)

assert result.stdout == (
f"\x1b[97mdebug-output\x1b[0m, version \x1b[32m{__version__}\x1b[0m\n"
(
default_debug_colored_logging
+ default_debug_colored_version_details
+ r"\x1b\[97mdebug-output\x1b\[0m, "
rf"version \x1b\[32m{re.escape(__version__)}\x1b\[0m\n"
+ default_debug_colored_log_end
),
result.output,
)


Expand Down

0 comments on commit 411b993

Please sign in to comment.