[Python-checkins] r72770 - in python/branches/py3k: Lib/distutils/tests/test_archive_util.py Lib/distutils/tests/test_dir_util.py Misc/NEWS

tarek.ziade python-checkins at python.org
Mon May 18 14:29:07 CEST 2009


Author: tarek.ziade
Date: Mon May 18 14:29:06 2009
New Revision: 72770
Log:
Merged revisions 72768 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk
........
 r72768 | tarek.ziade | 2009年05月18日 14:21:26 +0200 (2009年5月18日) | 1 line
 
 Fixed #6053 - win32 fixes for distutils tests
........
Modified:
 python/branches/py3k/ (props changed)
 python/branches/py3k/Lib/distutils/tests/test_archive_util.py
 python/branches/py3k/Lib/distutils/tests/test_dir_util.py
 python/branches/py3k/Misc/NEWS
Modified: python/branches/py3k/Lib/distutils/tests/test_archive_util.py
==============================================================================
--- python/branches/py3k/Lib/distutils/tests/test_archive_util.py	(original)
+++ python/branches/py3k/Lib/distutils/tests/test_archive_util.py	Mon May 18 14:29:06 2009
@@ -3,6 +3,7 @@
 
 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 @@
 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 @@
 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'
Modified: python/branches/py3k/Lib/distutils/tests/test_dir_util.py
==============================================================================
--- python/branches/py3k/Lib/distutils/tests/test_dir_util.py	(original)
+++ python/branches/py3k/Lib/distutils/tests/test_dir_util.py	Mon May 18 14:29:06 2009
@@ -88,7 +88,7 @@
 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():
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS	(original)
+++ python/branches/py3k/Misc/NEWS	Mon May 18 14:29:06 2009
@@ -618,6 +618,8 @@
 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.
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /