Skip to content

Commit

Permalink
Update test_cli.py
Browse files Browse the repository at this point in the history
  • Loading branch information
FriedrichFroebel authored Dec 15, 2024
1 parent fbe8cdf commit ab8f77d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,17 @@ def test_bad_action(self, action='eggs'):
else:
action_strings = ', '.join(map(lambda x: f"'{x}'", self.action_names))
print(action_strings)
stderr = stderr.getvalue()
print('stderr', stderr.encode())
print(
'expected',
(
f'usage: didjvu [-h] [--version] {{{action_values}}} ...\n'
f"didjvu: error: argument {{{action_values}}}: invalid choice: 'eggs' (choose from {action_strings})\n"
).encode()
)
self.assertMultiLineEqual(
stderr.getvalue(),
stderr,
(
f'usage: didjvu [-h] [--version] {{{action_values}}} ...\n'
f"didjvu: error: argument {{{action_values}}}: invalid choice: 'eggs' (choose from {action_strings})\n"
Expand Down

0 comments on commit ab8f77d

Please sign in to comment.