summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests/test_sysconfig.py
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2010-01-29 11:41:03 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2010-01-29 11:41:03 (GMT)
commitedacea30e457e151611a9fe560120cedb3bdc527 (patch)
tree3227e5e1c060cce48b00d34b9ae46571f079e2fb /Lib/distutils/tests/test_sysconfig.py
parent82b83985832a0b1922aa86261f764b12a7237ac5 (diff)
downloadcpython-edacea30e457e151611a9fe560120cedb3bdc527.zip
cpython-edacea30e457e151611a9fe560120cedb3bdc527.tar.gz
cpython-edacea30e457e151611a9fe560120cedb3bdc527.tar.bz2
Merged revisions 77704,77752 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77704 | tarek.ziade | 2010-01-23 10:23:15 +0100 (Sat, 23 Jan 2010) | 1 line taking sysconfig out of distutils ........ r77752 | tarek.ziade | 2010-01-26 00:19:56 +0100 (Tue, 26 Jan 2010) | 1 line switched the call order so this call works without suffering from issue #7774 ........
Diffstat (limited to 'Lib/distutils/tests/test_sysconfig.py')
-rw-r--r--Lib/distutils/tests/test_sysconfig.py36
1 files changed, 6 insertions, 30 deletions
diff --git a/Lib/distutils/tests/test_sysconfig.py b/Lib/distutils/tests/test_sysconfig.py
index edc755e..e7df803 100644
--- a/Lib/distutils/tests/test_sysconfig.py
+++ b/Lib/distutils/tests/test_sysconfig.py
@@ -4,7 +4,6 @@ import test
import unittest
from distutils import sysconfig
-from distutils.ccompiler import get_default_compiler
from distutils.tests import support
from test.support import TESTFN, run_unittest
@@ -26,10 +25,7 @@ class SysconfigTestCase(support.EnvironGuard,
elif os.path.isdir(TESTFN):
shutil.rmtree(TESTFN)
- def test_get_config_h_filename(self):
- config_h = sysconfig.get_config_h_filename()
- self.assertTrue(os.path.isfile(config_h), config_h)
-
+ @support.capture_warnings
def test_get_python_lib(self):
lib_dir = sysconfig.get_python_lib()
# XXX doesn't work on Linux when Python was never installed before
@@ -37,7 +33,11 @@ class SysconfigTestCase(support.EnvironGuard,
# test for pythonxx.lib?
self.assertNotEqual(sysconfig.get_python_lib(),
sysconfig.get_python_lib(prefix=TESTFN))
+ _sysconfig = __import__('sysconfig')
+ res = sysconfig.get_python_lib(True, True)
+ self.assertEquals(_sysconfig.get_path('platstdlib'), res)
+ @support.capture_warnings
def test_get_python_inc(self):
inc_dir = sysconfig.get_python_inc()
# This is not much of a test. We make sure Python.h exists
@@ -47,31 +47,7 @@ class SysconfigTestCase(support.EnvironGuard,
python_h = os.path.join(inc_dir, "Python.h")
self.assertTrue(os.path.isfile(python_h), python_h)
- def test_get_config_vars(self):
- cvars = sysconfig.get_config_vars()
- self.assertTrue(isinstance(cvars, dict))
- self.assertTrue(cvars)
-
- def test_customize_compiler(self):
-
- # not testing if default compiler is not unix
- if get_default_compiler() != 'unix':
- return
-
- os.environ['AR'] = 'my_ar'
- os.environ['ARFLAGS'] = '-arflags'
-
- # 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'], 'my_ar -arflags')
-
+ @support.capture_warnings
def test_parse_makefile_base(self):
self.makefile = TESTFN
fd = open(self.makefile, 'w')