mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-96848: Fix -X int_max_str_digits option parsing (#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.
This commit is contained in:
parent
2b428a1fae
commit
41351662bc
3 changed files with 7 additions and 1 deletions
|
@ -871,6 +871,8 @@ class CmdLineTest(unittest.TestCase):
|
|||
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