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
3917b17a
Commit
3917b17a
authored
May 28, 2009
by
Tarek Ziadé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
using 'tar' then 'gzip' in the test, because 'tar -czf' is not supported under some platforms
parent
8488006f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
tests/test_archive_util.py
tests/test_archive_util.py
+7
-3
No files found.
tests/test_archive_util.py
View file @
3917b17a
...
@@ -20,6 +20,7 @@ except ImportError:
...
@@ -20,6 +20,7 @@ except ImportError:
ZIP_SUPPORT
=
find_executable
(
'zip'
)
ZIP_SUPPORT
=
find_executable
(
'zip'
)
class
ArchiveUtilTestCase
(
support
.
TempdirManager
,
class
ArchiveUtilTestCase
(
support
.
TempdirManager
,
support
.
LoggingSilencer
,
unittest
.
TestCase
):
unittest
.
TestCase
):
def
test_make_tarball
(
self
):
def
test_make_tarball
(
self
):
...
@@ -82,7 +83,8 @@ class ArchiveUtilTestCase(support.TempdirManager,
...
@@ -82,7 +83,8 @@ class ArchiveUtilTestCase(support.TempdirManager,
base_name
=
os
.
path
.
join
(
tmpdir2
,
'archive'
)
base_name
=
os
.
path
.
join
(
tmpdir2
,
'archive'
)
return
tmpdir
,
tmpdir2
,
base_name
return
tmpdir
,
tmpdir2
,
base_name
@
unittest
.
skipUnless
(
find_executable
(
'tar'
),
'Need the tar command to run'
)
@
unittest
.
skipUnless
(
find_executable
(
'tar'
)
and
find_executable
(
'gzip'
),
'Need the tar command to run'
)
def
test_tarfile_vs_tar
(
self
):
def
test_tarfile_vs_tar
(
self
):
tmpdir
,
tmpdir2
,
base_name
=
self
.
_create_files
()
tmpdir
,
tmpdir2
,
base_name
=
self
.
_create_files
()
old_dir
=
os
.
getcwd
()
old_dir
=
os
.
getcwd
()
...
@@ -98,11 +100,13 @@ class ArchiveUtilTestCase(support.TempdirManager,
...
@@ -98,11 +100,13 @@ class ArchiveUtilTestCase(support.TempdirManager,
# now create another tarball using `tar`
# now create another tarball using `tar`
tarball2
=
os
.
path
.
join
(
tmpdir
,
'archive2.tar.gz'
)
tarball2
=
os
.
path
.
join
(
tmpdir
,
'archive2.tar.gz'
)
cmd
=
[
'tar'
,
'-czf'
,
'archive2.tar.gz'
,
'dist'
]
tar_cmd
=
[
'tar'
,
'-cf'
,
'archive2.tar'
,
'dist'
]
gzip_cmd
=
[
'gzip'
,
'-f9'
,
'archive2.tar'
]
old_dir
=
os
.
getcwd
()
old_dir
=
os
.
getcwd
()
os
.
chdir
(
tmpdir
)
os
.
chdir
(
tmpdir
)
try
:
try
:
spawn
(
cmd
)
spawn
(
tar_cmd
)
spawn
(
gzip_cmd
)
finally
:
finally
:
os
.
chdir
(
old_dir
)
os
.
chdir
(
old_dir
)
...
...
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