Commit 6f997785 authored by Tarek Ziadé's avatar Tarek Ziadé

fixed AR/ARFLAGS values in test_sysconfig

parent 3a6e886f
...@@ -11,11 +11,15 @@ from test.test_support import TESTFN ...@@ -11,11 +11,15 @@ from test.test_support import TESTFN
class SysconfigTestCase(unittest.TestCase): class SysconfigTestCase(unittest.TestCase):
def setUp(self): 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): def tearDown(self):
if self.old_AR is not None: for name, value in self.old_flags:
os.environ['AR'] = self.old_AR 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): def test_get_config_h_filename(self):
config_h = sysconfig.get_config_h_filename() config_h = sysconfig.get_config_h_filename()
......
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