Skip to content

Commit dd3ede7

Browse files
bpo-33358: Fix test_embed.test_pre_initialization_sys_options (GH-6612)
Fix test_embed.test_pre_initialization_sys_options() when building with --enable-shared (cherry picked from commit 4114846) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
1 parent 291c9d4 commit dd3ede7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Lib/test/test_embed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def test_pre_initialization_sys_options(self):
208208
Checks that sys.warnoptions and sys._xoptions can be set before the
209209
runtime is initialized (otherwise they won't be effective).
210210
"""
211-
env = dict(PYTHONPATH=os.pathsep.join(sys.path))
211+
env = dict(os.environ, PYTHONPATH=os.pathsep.join(sys.path))
212212
out, err = self.run_embedded_interpreter(
213213
"pre_initialization_sys_options", env=env)
214214
expected_output = (
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix ``test_embed.test_pre_initialization_sys_options()`` when the interpreter
2+
is built with ``--enable-shared``.

0 commit comments

Comments
 (0)