Skip to content

Commit

Permalink
Merge pull request #4664 from mwichmann/test/release-info
Browse files Browse the repository at this point in the history
Change update-release-info test for Python changes
  • Loading branch information
bdbaddog authored Dec 15, 2024
2 parents 8e216da + 406fb6e commit 343ff48
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
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

0 comments on commit 343ff48

Please sign in to comment.