diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2023-10-02 19:59:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-02 19:59:05 (GMT) |
commit | a040a32ea2f13f16172394d3e3e3f80f47f25a68 (patch) | |
tree | 35048792d20e773569686cdcfe06de881f823b2d /Lib/test/test_embed.py | |
parent | fc2cb86d210555d509debaeefd370d5331cd9d93 (diff) | |
download | cpython-a040a32ea2f13f16172394d3e3e3f80f47f25a68.zip cpython-a040a32ea2f13f16172394d3e3e3f80f47f25a68.tar.gz cpython-a040a32ea2f13f16172394d3e3e3f80f47f25a68.tar.bz2 |
gh-109853: Fix sys.path[0] For Subinterpreters (gh-109994)
This change makes sure sys.path[0] is set properly for subinterpreters. Before, it wasn't getting set at all. This PR does not address the broader concerns from gh-109853.
Diffstat (limited to 'Lib/test/test_embed.py')
-rw-r--r-- | Lib/test/test_embed.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py index 852b357..dc476ef 100644 --- a/Lib/test/test_embed.py +++ b/Lib/test/test_embed.py @@ -505,6 +505,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase): 'run_command': None, 'run_module': None, 'run_filename': None, + 'sys_path_0': None, '_install_importlib': 1, 'check_hash_pycs_mode': 'default', @@ -1132,6 +1133,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase): 'program_name': './python3', 'run_command': code + '\n', 'parse_argv': 2, + 'sys_path_0': '', } self.check_all_configs("test_init_run_main", config, api=API_PYTHON) @@ -1147,6 +1149,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase): 'run_command': code + '\n', 'parse_argv': 2, '_init_main': 0, + 'sys_path_0': '', } self.check_all_configs("test_init_main", config, api=API_PYTHON, |