Skip to content

Commit

Permalink
[3.12] pythongh-116656: Fix test_capi test_py_config_isoloated_per_in…
Browse files Browse the repository at this point in the history
…terpreter() (pythonGH-116658) (python#116668)

pythongh-116656: Fix test_capi test_py_config_isoloated_per_interpreter() (pythonGH-116658)

Don't parse argv when setting the configuration, to avoid SystemExit if parsing argv fails.
(cherry picked from commit f6e7a6c)

Co-authored-by: Victor Stinner <vstinner@python.org>
  • Loading branch information
miss-islington and vstinner committed Mar 12, 2024
1 parent d19c2eb commit b38c04e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Lib/test/test_capi/test_misc.py
Expand Up @@ -1773,6 +1773,7 @@ def test_py_config_isoloated_per_interpreter(self):
# double checked at the time this test was written.
config = _testinternalcapi.get_config()
config['int_max_str_digits'] = 55555
config['parse_argv'] = 0
_testinternalcapi.set_config(config)
sub_value = _testinternalcapi.get_config()['int_max_str_digits']
assert sub_value == 55555, sub_value
Expand Down

0 comments on commit b38c04e

Please sign in to comment.