]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-116656: Fix test_capi test_py_config_isoloated_per_interpreter() (GH-116658...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 12 Mar 2024 18:06:32 +0000 (19:06 +0100)
committerGitHub <noreply@github.com>
Tue, 12 Mar 2024 18:06:32 +0000 (19:06 +0100)
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 <vstinner@python.org>
Lib/test/test_capi/test_misc.py

index 403c4e96818da2ce734081f328cdc3387c73623d..37dff355b1ca64b0a5c532b34ccf878652fe2c18 100644 (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