Skip to content

Commit ffb8a38

Browse files
committed
test_default_arguments: Adjust for Python 3.10.
Signed-off-by: Anders Kaseorg <[email protected]>
1 parent 34f5c4e commit ffb8a38

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

zulip/tests/test_default_arguments.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@ def test_invalid_arguments(self) -> None:
1919
parser.parse_args(["invalid argument"])
2020
self.assertEqual(cm.exception.code, 2)
2121
# Assert that invalid arguments exit with printing the full usage (non-standard behavior)
22-
self.assertTrue(
23-
mock_stderr.getvalue().startswith(
24-
"""usage: lorem ipsum
22+
self.assertRegex(
23+
mock_stderr.getvalue(),
24+
r"""^usage: lorem ipsum
2525
26-
optional arguments:
26+
(optional arguments|options):
2727
-h, --help show this help message and exit
2828
2929
Zulip API configuration:
3030
--site ZULIP_SITE Zulip server URI
31-
"""
32-
)
31+
""",
3332
)
3433

3534
@patch("os.path.exists", return_value=False)

0 commit comments

Comments
 (0)