1- """Tests for 'site'.
2-
3- Tests assume the initial paths in sys.path once the interpreter has begun
4- executing have not been removed.
5-
6- """
71import unittest
82import sys
93import os
2317class TestSysConfig (unittest .TestCase ):
2418
2519 def setUp (self ):
26- """Make a copy of sys.path"""
2720 super (TestSysConfig , self ).setUp ()
2821 self .sys_path = sys .path [:]
2922 self .makefile = None
@@ -53,7 +46,6 @@ def setUp(self):
5346 self ._added_envvars .append (var )
5447
5548 def tearDown (self ):
56- """Restore sys.path"""
5749 sys .path [:] = self .sys_path
5850 if self .makefile is not None :
5951 os .unlink (self .makefile )
@@ -145,8 +137,6 @@ def test_get_platform(self):
145137 ('Darwin Kernel Version 8.11.1: '
146138 'Wed Oct 10 18:23:28 PDT 2007; '
147139 'root:xnu-792.25.20~1/RELEASE_I386' ), 'PowerPC' ))
148-
149-
150140 get_config_vars ()['MACOSX_DEPLOYMENT_TARGET' ] = '10.3'
151141
152142 get_config_vars ()['CFLAGS' ] = ('-fno-strict-aliasing -DNDEBUG -g '
@@ -161,7 +151,6 @@ def test_get_platform(self):
161151 finally :
162152 sys .maxsize = maxint
163153
164-
165154 self ._set_uname (('Darwin' , 'macziade' , '8.11.1' ,
166155 ('Darwin Kernel Version 8.11.1: '
167156 'Wed Oct 10 18:23:28 PDT 2007; '
@@ -295,7 +284,6 @@ def test_ldshared_value(self):
295284
296285 self .assertIn (ldflags , ldshared )
297286
298-
299287 @unittest .skipUnless (sys .platform == "darwin" , "test only relevant on MacOSX" )
300288 def test_platform_in_subprocess (self ):
301289 my_platform = sysconfig .get_platform ()
@@ -321,7 +309,6 @@ def test_platform_in_subprocess(self):
321309 self .assertEqual (status , 0 )
322310 self .assertEqual (my_platform , test_platform )
323311
324-
325312 # Test with MACOSX_DEPLOYMENT_TARGET in the environment, and
326313 # using a value that is unlikely to be the default one.
327314 env = os .environ .copy ()
@@ -342,8 +329,6 @@ def test_platform_in_subprocess(self):
342329 self .assertEqual (my_platform , test_platform )
343330
344331
345-
346-
347332def test_main ():
348333 run_unittest (TestSysConfig )
349334
0 commit comments