From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 12 Mar 2024 18:06:32 +0000 (+0100) Subject: [3.12] gh-116656: Fix test_capi test_py_config_isoloated_per_interpreter() (GH-116658... X-Git-Tag: v3.12.3~115 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b38c04e70c63ae880da857891444c1be56474da1;p=thirdparty%2FPython%2Fcpython.git [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 f6e7a6ce651b43c6e060608a4bb20685f39e9eaa) Co-authored-by: Victor Stinner --- diff --git a/Lib/test/test_capi/test_misc.py b/Lib/test/test_capi/test_misc.py index 403c4e96818d..37dff355b1ca 100644 --- a/Lib/test/test_capi/test_misc.py +++ b/Lib/test/test_capi/test_misc.py @@ -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