summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sysconfig.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-05-26 14:35:14 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-05-26 14:35:14 (GMT)
commitf46676d48fe0e06ee76c6158cb915c20e8751ced (patch)
treebd77e24b11f2a378e60ff432ef9f0330dfb3f82f /Lib/test/test_sysconfig.py
parent92236e5651ade38b31281ed92e2c2846f8ccd0d8 (diff)
parentaa1ef2d735772b7a4c4b4164998da2883208ea48 (diff)
downloadcpython-f46676d48fe0e06ee76c6158cb915c20e8751ced.zip
cpython-f46676d48fe0e06ee76c6158cb915c20e8751ced.tar.gz
cpython-f46676d48fe0e06ee76c6158cb915c20e8751ced.tar.bz2
Branch merge
Diffstat (limited to 'Lib/test/test_sysconfig.py')
-rw-r--r--Lib/test/test_sysconfig.py19
1 files changed, 4 insertions, 15 deletions
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index 5c84a75..96f75f2 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -1,9 +1,3 @@
-"""Tests for 'site'.
-
-Tests assume the initial paths in sys.path once the interpreter has begun
-executing have not been removed.
-
-"""
import unittest
import sys
import os
@@ -20,10 +14,10 @@ from sysconfig import (get_paths, get_platform, get_config_vars,
_get_default_scheme, _expand_vars,
get_scheme_names, get_config_var, _main)
+
class TestSysConfig(unittest.TestCase):
def setUp(self):
- """Make a copy of sys.path"""
super(TestSysConfig, self).setUp()
self.sys_path = sys.path[:]
# patching os.uname
@@ -52,7 +46,6 @@ class TestSysConfig(unittest.TestCase):
self._added_envvars.append(var)
def tearDown(self):
- """Restore sys.path"""
sys.path[:] = self.sys_path
self._cleanup_testfn()
if self.uname is not None:
@@ -142,8 +135,6 @@ class TestSysConfig(unittest.TestCase):
('Darwin Kernel Version 8.11.1: '
'Wed Oct 10 18:23:28 PDT 2007; '
'root:xnu-792.25.20~1/RELEASE_I386'), 'PowerPC'))
-
-
get_config_vars()['MACOSX_DEPLOYMENT_TARGET'] = '10.3'
get_config_vars()['CFLAGS'] = ('-fno-strict-aliasing -DNDEBUG -g '
@@ -158,7 +149,6 @@ class TestSysConfig(unittest.TestCase):
finally:
sys.maxsize = maxint
-
self._set_uname(('Darwin', 'macziade', '8.11.1',
('Darwin Kernel Version 8.11.1: '
'Wed Oct 10 18:23:28 PDT 2007; '
@@ -216,9 +206,9 @@ class TestSysConfig(unittest.TestCase):
get_config_vars()['CFLAGS'] = ('-arch %s -isysroot '
'/Developer/SDKs/MacOSX10.4u.sdk '
'-fno-strict-aliasing -fno-common '
- '-dynamic -DNDEBUG -g -O3'%(arch,))
+ '-dynamic -DNDEBUG -g -O3' % arch)
- self.assertEqual(get_platform(), 'macosx-10.4-%s'%(arch,))
+ self.assertEqual(get_platform(), 'macosx-10.4-%s' % arch)
# linux debian sarge
os.name = 'posix'
@@ -286,7 +276,6 @@ class TestSysConfig(unittest.TestCase):
self.assertIn(ldflags, ldshared)
-
@unittest.skipUnless(sys.platform == "darwin", "test only relevant on MacOSX")
def test_platform_in_subprocess(self):
my_platform = sysconfig.get_platform()
@@ -312,7 +301,6 @@ class TestSysConfig(unittest.TestCase):
self.assertEqual(status, 0)
self.assertEqual(my_platform, test_platform)
-
# Test with MACOSX_DEPLOYMENT_TARGET in the environment, and
# using a value that is unlikely to be the default one.
env = os.environ.copy()
@@ -334,6 +322,7 @@ class TestSysConfig(unittest.TestCase):
class MakefileTests(unittest.TestCase):
+
@unittest.skipIf(sys.platform.startswith('win'),
'Test is not Windows compatible')
def test_get_makefile_filename(self):