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 ........
This commit is contained in:
parent
40c00271fe
commit
93fb3aad50
|
@ -3,6 +3,7 @@ __revision__ = "$Id$"
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import os
|
import os
|
||||||
|
from os.path import splitdrive
|
||||||
|
|
||||||
from distutils.archive_util import (check_archive_formats, make_tarball,
|
from distutils.archive_util import (check_archive_formats, make_tarball,
|
||||||
make_zipfile, make_archive)
|
make_zipfile, make_archive)
|
||||||
|
@ -26,13 +27,16 @@ class ArchiveUtilTestCase(support.TempdirManager,
|
||||||
self.write_file([tmpdir, 'file2'], 'xxx')
|
self.write_file([tmpdir, 'file2'], 'xxx')
|
||||||
|
|
||||||
tmpdir2 = self.mkdtemp()
|
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')
|
base_name = os.path.join(tmpdir2, 'archive')
|
||||||
|
|
||||||
# working with relative paths to avoid tar warnings
|
# working with relative paths to avoid tar warnings
|
||||||
old_dir = os.getcwd()
|
old_dir = os.getcwd()
|
||||||
os.chdir(tmpdir)
|
os.chdir(tmpdir)
|
||||||
try:
|
try:
|
||||||
make_tarball(base_name, '.')
|
make_tarball(splitdrive(base_name)[1], '.')
|
||||||
finally:
|
finally:
|
||||||
os.chdir(old_dir)
|
os.chdir(old_dir)
|
||||||
|
|
||||||
|
@ -45,7 +49,7 @@ class ArchiveUtilTestCase(support.TempdirManager,
|
||||||
old_dir = os.getcwd()
|
old_dir = os.getcwd()
|
||||||
os.chdir(tmpdir)
|
os.chdir(tmpdir)
|
||||||
try:
|
try:
|
||||||
make_tarball(base_name, '.', compress=None)
|
make_tarball(splitdrive(base_name)[1], '.', compress=None)
|
||||||
finally:
|
finally:
|
||||||
os.chdir(old_dir)
|
os.chdir(old_dir)
|
||||||
tarball = base_name + '.tar'
|
tarball = base_name + '.tar'
|
||||||
|
|
|
@ -88,7 +88,7 @@ class DirUtilTestCase(support.TempdirManager, unittest.TestCase):
|
||||||
self.assertEquals(ensure_relative('/home/foo'), 'home/foo')
|
self.assertEquals(ensure_relative('/home/foo'), 'home/foo')
|
||||||
self.assertEquals(ensure_relative('some/path'), 'some/path')
|
self.assertEquals(ensure_relative('some/path'), 'some/path')
|
||||||
else: # \\
|
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')
|
self.assertEquals(ensure_relative('home\\foo'), 'home\\foo')
|
||||||
|
|
||||||
def test_suite():
|
def test_suite():
|
||||||
|
|
|
@ -618,6 +618,8 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #6053: Fixed distutils tests on win32. patch by Hirokazu Yamamoto.
|
||||||
|
|
||||||
- Issue #6046: Fixed the library extension when distutils build_ext is used
|
- Issue #6046: Fixed the library extension when distutils build_ext is used
|
||||||
inplace. Initial patch by Roumen Petrov.
|
inplace. Initial patch by Roumen Petrov.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue