]> granicus.if.org Git - python/commitdiff
bpo-33358: Fix test_embed.test_pre_initialization_sys_options (GH-6612)
authorPablo Galindo <Pablogsal@gmail.com>
Fri, 27 Apr 2018 12:23:13 +0000 (13:23 +0100)
committerVictor Stinner <vstinner@redhat.com>
Fri, 27 Apr 2018 12:23:13 +0000 (14:23 +0200)
Fix test_embed.test_pre_initialization_sys_options() when building with --enable-shared

Lib/test/test_embed.py
Misc/NEWS.d/next/Tests/2018-04-27-11-46-35.bpo-33358._OcR59.rst [new file with mode: 0644]

index f926301b846610613646672c630b1ae1b0b55315..c52cb9948782df0d2f64190f1f29f5296f48f58c 100644 (file)
@@ -208,7 +208,7 @@ class EmbeddingTests(unittest.TestCase):
         Checks that sys.warnoptions and sys._xoptions can be set before the
         runtime is initialized (otherwise they won't be effective).
         """
-        env = dict(PYTHONPATH=os.pathsep.join(sys.path))
+        env = dict(os.environ, PYTHONPATH=os.pathsep.join(sys.path))
         out, err = self.run_embedded_interpreter(
                         "pre_initialization_sys_options", env=env)
         expected_output = (
diff --git a/Misc/NEWS.d/next/Tests/2018-04-27-11-46-35.bpo-33358._OcR59.rst b/Misc/NEWS.d/next/Tests/2018-04-27-11-46-35.bpo-33358._OcR59.rst
new file mode 100644 (file)
index 0000000..89406e9
--- /dev/null
@@ -0,0 +1,2 @@
+Fix ``test_embed.test_pre_initialization_sys_options()`` when the interpreter
+is built with ``--enable-shared``.