mirror of
https://github.com/python/cpython.git
synced 2026-01-04 22:42:14 +00:00
gh-96848: Fix -X int_max_str_digits option parsing (GH-96988)
Fix command line parsing: reject "-X int_max_str_digits" option with
no value (invalid) when the PYTHONINTMAXSTRDIGITS environment
variable is set to a valid limit.
(cherry picked from commit 41351662bc)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
cf61fa278e
commit
a4ff0eaaf0
3 changed files with 7 additions and 1 deletions
|
|
@ -874,6 +874,8 @@ def test_int_max_str_digits(self):
|
|||
assert_python_failure('-X', 'int_max_str_digits', '-c', code)
|
||||
assert_python_failure('-X', 'int_max_str_digits=foo', '-c', code)
|
||||
assert_python_failure('-X', 'int_max_str_digits=100', '-c', code)
|
||||
assert_python_failure('-X', 'int_max_str_digits', '-c', code,
|
||||
PYTHONINTMAXSTRDIGITS='4000')
|
||||
|
||||
assert_python_failure('-c', code, PYTHONINTMAXSTRDIGITS='foo')
|
||||
assert_python_failure('-c', code, PYTHONINTMAXSTRDIGITS='100')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue