mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +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
8bdaf9bf8e
commit
00c352404a
3 changed files with 7 additions and 1 deletions
|
|
@ -831,6 +831,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