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
57661611
Commit
57661611
authored
Dec 26, 2011
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ported some test cases from 2.7 for #11638
parent
41dcae00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
tests/test_archive_util.py
tests/test_archive_util.py
+21
-2
No files found.
tests/test_archive_util.py
View file @
57661611
# -*- coding: utf-8 -*-
"""Tests for distutils.archive_util."""
import
unittest
import
os
...
...
@@ -32,6 +33,24 @@ class ArchiveUtilTestCase(support.TempdirManager,
@
unittest
.
skipUnless
(
ZLIB_SUPPORT
,
'Need zlib support to run'
)
def
test_make_tarball
(
self
):
self
.
_make_tarball
(
'archive'
)
@
unittest
.
skipUnless
(
ZLIB_SUPPORT
,
'Need zlib support to run'
)
def
test_make_tarball_latin1
(
self
):
"""
Mirror test_make_tarball, except filename contains latin characters.
"""
self
.
_make_tarball
(
'årchiv'
)
# note this isn't a real word
@
unittest
.
skipUnless
(
ZLIB_SUPPORT
,
'Need zlib support to run'
)
def
test_make_tarball_extended
(
self
):
"""
Mirror test_make_tarball, except filename contains extended
characters outside the latin charset.
"""
self
.
_make_tarball
(
'のアーカイブ'
)
# japanese for archive
def
_make_tarball
(
self
,
target_name
):
# creating something to tar
tmpdir
=
self
.
mkdtemp
()
self
.
write_file
([
tmpdir
,
'file1'
],
'xxx'
)
...
...
@@ -43,7 +62,7 @@ class ArchiveUtilTestCase(support.TempdirManager,
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
,
target_name
)
# working with relative paths to avoid tar warnings
old_dir
=
os
.
getcwd
()
...
...
@@ -58,7 +77,7 @@ class ArchiveUtilTestCase(support.TempdirManager,
self
.
assertTrue
(
os
.
path
.
exists
(
tarball
))
# trying an uncompressed one
base_name
=
os
.
path
.
join
(
tmpdir2
,
'archive'
)
base_name
=
os
.
path
.
join
(
tmpdir2
,
target_name
)
old_dir
=
os
.
getcwd
()
os
.
chdir
(
tmpdir
)
try
:
...
...
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