Kaydet (Commit) 15f8d0d3 authored tarafından Victor Stinner's avatar Victor Stinner Kaydeden (comit) GitHub

test_distutils: use EnvironGuard (#1433)

Use EnvironGuard on InstallTestCase and UtilTestCase.

Backport fixes from master to prevent the following warning:

Warning -- os.environ was modified by test_distutils
üst 2b183b87
......@@ -26,6 +26,7 @@ def _make_ext_name(modname):
class InstallTestCase(support.TempdirManager,
support.EnvironGuard,
support.LoggingSilencer,
unittest.TestCase):
......
......@@ -4,10 +4,11 @@ import unittest
from test.test_support import run_unittest
from distutils.errors import DistutilsByteCompileError
from distutils.tests import support
from distutils.util import byte_compile, grok_environment_error
class UtilTestCase(unittest.TestCase):
class UtilTestCase(support.EnvironGuard, unittest.TestCase):
def test_dont_write_bytecode(self):
# makes sure byte_compile raise a DistutilsError
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment