Skip to content
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

Change update-release-info test for Python changes #4664

Merged
merged 1 commit into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
Only object-like macros are replaced (not function-like), and
only on a whole-word basis; recursion is limited to five levels
and does not error out if that limit is reached (issue #4523).
- The update-release-info test is adapted to accept changed help output
introduced in Python 3.12.8/3.13.1.


RELEASE 4.8.1 - Tue, 03 Sep 2024 17:22:20 -0700
Expand Down
17 changes: 15 additions & 2 deletions test/update-release-info/update-release-info.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,24 @@
if not os.path.exists(test.program):
test.skip_test("update-release-info.py is not distributed in this package\n")

expected_stderr = """usage: update-release-info.py [-h] [--verbose] [--timestamp TIMESTAMP]
expected_stderr = """\
usage: update-release-info.py [-h] [--verbose] [--timestamp TIMESTAMP]
[{develop,release,post}]
update-release-info.py: error: argument mode: invalid choice: 'bad' (choose from 'develop', 'release', 'post')
"""
test.run(arguments='bad', stderr=expected_stderr, status=2)
# The way the choices are rendered in help by argparse changed with
# Python 3.12.8, # 3.13.1, 3.14.0a2. Change the test to accept either.
expected_stderr_new = """\
usage: update-release-info.py [-h] [--verbose] [--timestamp TIMESTAMP]
[{develop,release,post}]
update-release-info.py: error: argument mode: invalid choice: 'bad' (choose from develop, release, post)
"""
test.run(arguments='bad', stderr=None, status=2)
fail_strings = [
expected_stderr,
expected_stderr_new,
]
test.must_contain_any_line(test.stderr(), fail_strings)

# Strings to go in ReleaseConfig
combo_strings = [
Expand Down
Loading