[3.12] gh-116656: Fix test_capi test_py_config_isoloated_per_interpreter() (GH-116658) (#116668)

gh-116656: Fix test_capi test_py_config_isoloated_per_interpreter() (GH-116658)

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

Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Miss Islington (bot) 2024-03-12 19:06:32 +01:00 committed by GitHub
parent d19c2eb604
commit b38c04e70c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1773,6 +1773,7 @@ class SubinterpreterTest(unittest.TestCase):
# 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