summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests/support.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/distutils/tests/support.py')
-rw-r--r--Lib/distutils/tests/support.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/distutils/tests/support.py b/Lib/distutils/tests/support.py
index ab2af9a..cdcbc37 100644
--- a/Lib/distutils/tests/support.py
+++ b/Lib/distutils/tests/support.py
@@ -5,6 +5,7 @@ import tempfile
from distutils import log
from distutils.core import Distribution
+from test.support import EnvironmentVarGuard
class LoggingSilencer(object):
@@ -82,3 +83,13 @@ class DummyCommand:
def ensure_finalized(self):
pass
+
+class EnvironGuard(object):
+
+ def setUp(self):
+ super(EnvironGuard, self).setUp()
+ self.environ = EnvironmentVarGuard()
+
+ def tearDown(self):
+ self.environ.__exit__()
+ super(EnvironGuard, self).tearDown()