Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
74ddca39
Commit
74ddca39
authored
May 18, 2009
by
Tarek Ziadé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed #6053 - win32 fixes for distutils tests
parent
339ad8b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
tests/test_archive_util.py
tests/test_archive_util.py
+6
-2
tests/test_dir_util.py
tests/test_dir_util.py
+1
-1
No files found.
tests/test_archive_util.py
View file @
74ddca39
...
...
@@ -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'
...
...
tests/test_dir_util.py
View file @
74ddca39
...
...
@@ -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
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment