summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-02-13 23:48:11 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-02-13 23:48:11 (GMT)
commit8c20189ce4bb26b18306a7b5fc05db62cf6e9a11 (patch)
tree3362ca4a223937039591f5a9540d116c423dfdf9
parent68c50950c9267b972a2576f2094c6feac457a4f2 (diff)
downloadcpython-8c20189ce4bb26b18306a7b5fc05db62cf6e9a11.zip
cpython-8c20189ce4bb26b18306a7b5fc05db62cf6e9a11.tar.gz
cpython-8c20189ce4bb26b18306a7b5fc05db62cf6e9a11.tar.bz2
Merged revisions 69602 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r69602 | tarek.ziade | 2009-02-14 00:41:57 +0100 (Sat, 14 Feb 2009) | 1 line fix the environ for distutils test_util ........
-rw-r--r--Lib/distutils/tests/test_util.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/distutils/tests/test_util.py b/Lib/distutils/tests/test_util.py
index 3505fe2..ca58626 100644
--- a/Lib/distutils/tests/test_util.py
+++ b/Lib/distutils/tests/test_util.py
@@ -35,11 +35,12 @@ class utilTestCase(unittest.TestCase):
if hasattr(os, 'uname'):
self.uname = os.uname
self._uname = os.uname()
- os.uname = self._get_uname
else:
self.uname = None
self._uname = None
+ os.uname = self._get_uname
+
def tearDown(self):
# getting back tne environment
os.name = self.name
@@ -91,6 +92,7 @@ class utilTestCase(unittest.TestCase):
('Darwin Kernel Version 8.11.1: '
'Wed Oct 10 18:23:28 PDT 2007; '
'root:xnu-792.25.20~1/RELEASE_I386'), 'i386'))
+ os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.3'
self.assertEquals(get_platform(), 'macosx-10.3-i386')
@@ -136,6 +138,9 @@ class utilTestCase(unittest.TestCase):
def _isabs(path):
return path[0] == '/'
os.path.isabs = _isabs
+ def _join(*path):
+ return '/'.join(path)
+ os.path.join = _join
self.assertEquals(change_root('/root', '/old/its/here'),
'/root/old/its/here')