From 6f9977852ff61be2f55f82bbdb92e486c23d2dd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Thu, 7 May 2009 23:01:56 +0000 Subject: [PATCH] fixed AR/ARFLAGS values in test_sysconfig --- Lib/distutils/tests/test_sysconfig.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Lib/distutils/tests/test_sysconfig.py b/Lib/distutils/tests/test_sysconfig.py index 040dfcb6ad1..bf0043aa057 100644 --- a/Lib/distutils/tests/test_sysconfig.py +++ b/Lib/distutils/tests/test_sysconfig.py @@ -11,11 +11,15 @@ from test.test_support import TESTFN class SysconfigTestCase(unittest.TestCase): def setUp(self): - self.old_AR = os.environ.get('AR') + self.old_flags = [('AR', os.environ.get('AR')), + ('ARFLAGS', os.environ.get('ARFLAGS'))] def tearDown(self): - if self.old_AR is not None: - os.environ['AR'] = self.old_AR + for name, value in self.old_flags: + if value is not None: + os.environ[name] = value + elif name in os.environ: + del os.environ[name] def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename()