From: Victor Stinner Date: Thu, 4 May 2017 16:10:09 +0000 (+0200) Subject: test_distutils: test_build_ext uses EnvironGuard (#1458) X-Git-Tag: v2.7.14rc1~176 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f7f67660653517a5b3ed93e4b658583ff4cd355;p=python test_distutils: test_build_ext uses EnvironGuard (#1458) Use EnvironGuard on BuildExtTestCase to save/restore os.environ, to fix the following warning: Warning -- os.environ was modified by test_distutils MSVCCompiler.initialize() of distutils.msvc9compiler modifies os.environ. --- diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py index a4494dba4c..a6d2d2eb15 100644 --- a/Lib/distutils/tests/test_build_ext.py +++ b/Lib/distutils/tests/test_build_ext.py @@ -20,6 +20,7 @@ ALREADY_TESTED = False class BuildExtTestCase(support.TempdirManager, support.LoggingSilencer, + support.EnvironGuard, unittest.TestCase): def setUp(self): super(BuildExtTestCase, self).setUp()