bpo-33358: Fix test_embed.test_pre_initialization_sys_options (GH-6612)
https://github.com/python/cpython/commit/dd3ede7537653a62815c2fedbb67d6f2fb8... commit: dd3ede7537653a62815c2fedbb67d6f2fb870d4c branch: 3.7 author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> committer: GitHub <noreply@github.com> date: 2018-04-27T05:41:25-07:00 summary: 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 4114846265536344538ae44cb8ffd8ce2903faf7) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> files: A Misc/NEWS.d/next/Tests/2018-04-27-11-46-35.bpo-33358._OcR59.rst M Lib/test/test_embed.py diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py index f926301b8466..c52cb9948782 100644 --- a/Lib/test/test_embed.py +++ b/Lib/test/test_embed.py @@ -208,7 +208,7 @@ def test_pre_initialization_sys_options(self): 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 index 000000000000..89406e994a91 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2018-04-27-11-46-35.bpo-33358._OcR59.rst @@ -0,0 +1,2 @@ +Fix ``test_embed.test_pre_initialization_sys_options()`` when the interpreter +is built with ``--enable-shared``.
participants (1)
-
Miss Islington (bot)