summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-05-18 12:29:06 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-05-18 12:29:06 (GMT)
commit93fb3aad505d5f344f8ebf8da52ae9096f13e0ba (patch)
tree653626605027e55a52315306ed0801e85bc87663
parent40c00271fe8ae1b2b507a66f96f47adb97fa89f2 (diff)
downloadcpython-93fb3aad505d5f344f8ebf8da52ae9096f13e0ba.zip
cpython-93fb3aad505d5f344f8ebf8da52ae9096f13e0ba.tar.gz
cpython-93fb3aad505d5f344f8ebf8da52ae9096f13e0ba.tar.bz2
Merged revisions 72768 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72768 | tarek.ziade | 2009-05-18 14:21:26 +0200 (Mon, 18 May 2009) | 1 line Fixed #6053 - win32 fixes for distutils tests ........
-rw-r--r--Lib/distutils/tests/test_archive_util.py8
-rw-r--r--Lib/distutils/tests/test_dir_util.py2
-rw-r--r--Misc/NEWS2
3 files changed, 9 insertions, 3 deletions
diff --git a/Lib/distutils/tests/test_archive_util.py b/Lib/distutils/tests/test_archive_util.py
index 1c88457..cabb55b 100644
--- a/Lib/distutils/tests/test_archive_util.py
+++ b/Lib/distutils/tests/test_archive_util.py
@@ -3,6 +3,7 @@ __revision__ = "$Id$"
import unittest
import os
+from os.path import splitdrive
from distutils.archive_util import (check_archive_formats, make_tarball,
make_zipfile, make_archive)
@@ -26,13 +27,16 @@ class ArchiveUtilTestCase(support.TempdirManager,
self.write_file([tmpdir, 'file2'], 'xxx')
tmpdir2 = self.mkdtemp()
+ unittest.skipUnless(splitdrive(tmpdir)[0] == splitdrive(tmpdir2)[0],
+ "Source and target should be on same drive")
+
base_name = os.path.join(tmpdir2, 'archive')
# working with relative paths to avoid tar warnings
old_dir = os.getcwd()
os.chdir(tmpdir)
try:
- make_tarball(base_name, '.')
+ make_tarball(splitdrive(base_name)[1], '.')
finally:
os.chdir(old_dir)
@@ -45,7 +49,7 @@ class ArchiveUtilTestCase(support.TempdirManager,
old_dir = os.getcwd()
os.chdir(tmpdir)
try:
- make_tarball(base_name, '.', compress=None)
+ make_tarball(splitdrive(base_name)[1], '.', compress=None)
finally:
os.chdir(old_dir)
tarball = base_name + '.tar'
diff --git a/Lib/distutils/tests/test_dir_util.py b/Lib/distutils/tests/test_dir_util.py
index 9bd6530..6b22f05 100644
--- a/Lib/distutils/tests/test_dir_util.py
+++ b/Lib/distutils/tests/test_dir_util.py
@@ -88,7 +88,7 @@ class DirUtilTestCase(support.TempdirManager, unittest.TestCase):
self.assertEquals(ensure_relative('/home/foo'), 'home/foo')
self.assertEquals(ensure_relative('some/path'), 'some/path')
else: # \\
- self.assertEquals(ensure_relative('c:\\home\\foo'), 'home\\foo')
+ self.assertEquals(ensure_relative('c:\\home\\foo'), 'c:home\\foo')
self.assertEquals(ensure_relative('home\\foo'), 'home\\foo')
def test_suite():
diff --git a/Misc/NEWS b/Misc/NEWS
index 87e471e..bb028d9 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -618,6 +618,8 @@ Core and Builtins
Library
-------
+- Issue #6053: Fixed distutils tests on win32. patch by Hirokazu Yamamoto.
+
- Issue #6046: Fixed the library extension when distutils build_ext is used
inplace. Initial patch by Roumen Petrov.