diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-02-06 01:18:36 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-02-06 01:18:36 (GMT) |
commit | d3409deddc7fc24171514debf2ab2128e337d97d (patch) | |
tree | 5f5d7353add80671442c716c4dfc73bee44c8113 /Lib/distutils/tests | |
parent | 35e6fd5de9be36789e4f8f10350a27be559921b9 (diff) | |
download | cpython-d3409deddc7fc24171514debf2ab2128e337d97d.zip cpython-d3409deddc7fc24171514debf2ab2128e337d97d.tar.gz cpython-d3409deddc7fc24171514debf2ab2128e337d97d.tar.bz2 |
Merged revisions 69342 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r69342 | tarek.ziade | 2009-02-06 02:15:51 +0100 (Fri, 06 Feb 2009) | 1 line
fixed #1520877: now distutils reads Read from the environment/Makefile
........
Diffstat (limited to 'Lib/distutils/tests')
-rw-r--r-- | Lib/distutils/tests/test_sysconfig.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Lib/distutils/tests/test_sysconfig.py b/Lib/distutils/tests/test_sysconfig.py index 490410e..cb802c6 100644 --- a/Lib/distutils/tests/test_sysconfig.py +++ b/Lib/distutils/tests/test_sysconfig.py @@ -8,6 +8,13 @@ from test.support import TESTFN class SysconfigTestCase(unittest.TestCase): + def setUp(self): + self.old_AR = os.environ.get('AR') + + def tearDown(self): + if self.old_AR is not None: + os.environ['AR'] = self.old_AR + def test_get_config_h_filename(self): config_h = sysconfig.get_config_h_filename() self.assert_(os.path.isfile(config_h), config_h) @@ -32,6 +39,21 @@ class SysconfigTestCase(unittest.TestCase): self.assert_(isinstance(cvars, dict)) self.assert_(cvars) + def test_customize_compiler(self): + + os.environ['AR'] = 'xxx' + + # make sure AR gets caught + class compiler: + compiler_type = 'unix' + + def set_executables(self, **kw): + self.exes = kw + + comp = compiler() + sysconfig.customize_compiler(comp) + self.assertEquals(comp.exes['archiver'], 'xxx') + def test_suite(): suite = unittest.TestSuite() |