diff options
author | Mats Wichmann <mats@linux.com> | 2024-12-15 16:54:23 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2024-12-15 16:54:23 (GMT) |
commit | 406fb6e1cfb5e5684fe3311c7f5393e4e8531bf4 (patch) | |
tree | 1f63181db3a506df9e97123cf41f0a3732359c8c /test | |
parent | 8e216dae1c61f4303117e59cba7bf1f3a7d1049c (diff) | |
download | SCons-406fb6e1cfb5e5684fe3311c7f5393e4e8531bf4.zip SCons-406fb6e1cfb5e5684fe3311c7f5393e4e8531bf4.tar.gz SCons-406fb6e1cfb5e5684fe3311c7f5393e4e8531bf4.tar.bz2 |
Change update-release-info test for Python changes
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/update-release-info/update-release-info.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/test/update-release-info/update-release-info.py b/test/update-release-info/update-release-info.py index 2de4713..bebd8a9 100644 --- a/test/update-release-info/update-release-info.py +++ b/test/update-release-info/update-release-info.py @@ -53,11 +53,24 @@ test = TestRuntest.TestRuntest( 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 = [ |