Skip to content

Fix tests for Python 3.12.8 and 3.13.1 #157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/test_to_tap_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def _test_subclasser(

if isinstance(arg_to_expected_value, SystemExit):
stderr = _test_raises_system_exit(tap, args_string)
assert str(arg_to_expected_value) in stderr
assert re.search(str(arg_to_expected_value), stderr)
elif isinstance(arg_to_expected_value, BaseException):
expected_exception = arg_to_expected_value.__class__
expected_error_message = str(arg_to_expected_value) or None
Expand Down Expand Up @@ -471,7 +471,7 @@ def test_subclasser_complex_help_message(class_or_function_: Any):
(
"--arg_int 1 --baz X --foo b",
SystemExit(
"error: argument {a,b}: invalid choice: 'X' (choose from 'a', 'b')"
r"error: argument \{a,b}: invalid choice: 'X' \(choose from '?a'?, '?b'?\)"
),
),
(
Expand All @@ -480,7 +480,7 @@ def test_subclasser_complex_help_message(class_or_function_: Any):
),
(
"--arg_int 1 --foo b --baz A",
SystemExit("""error: argument --baz: Value for variable "baz" must be one of ['X', 'Y', 'Z']."""),
SystemExit(r"""error: argument --baz: Value for variable "baz" must be one of \['X', 'Y', 'Z']."""),
),
],
)
Expand Down
Loading