Skip to content

Commit

Permalink
Fix test_help_string
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Normandin <[email protected]>
  • Loading branch information
lebrice committed Dec 18, 2024
1 parent 8da45f6 commit 4477811
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion .regression_files/project/main_test/test_help_string.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

main is powered by Hydra.

== Configuration groups ==
Expand Down
4 changes: 2 additions & 2 deletions project/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ def test_help_string(file_regression: FileRegressionFixture) -> None:
capture_output=True,
).stdout
# Remove trailing whitespace so pre-commit doesn't change the regression file.
# Also remove the last empty line (which would also be removed by pre-commit).
help_string = "\n".join([line.rstrip() for line in help_string.splitlines()]).rstrip()
# Also remove first or last empty lines (which would also be removed by pre-commit).
help_string = "\n".join([line.rstrip() for line in help_string.splitlines()]).strip() + "\n"
file_regression.check(help_string)


Expand Down

0 comments on commit 4477811

Please sign in to comment.