Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mat2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jvoisin
mat2
Merge requests
!39
Add tar archive support
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add tar archive support
add_archive_support
into
master
Overview
0
Commits
4
Pipelines
8
Changes
5
Merged
jvoisin
requested to merge
add_archive_support
into
master
5 years ago
Overview
0
Commits
4
Pipelines
8
Changes
1
Expand
0
0
Merge request reports
Compare
version 3
version 7
f9943c51
5 years ago
version 6
8b765dbf
5 years ago
version 5
b5d586f4
5 years ago
version 4
bc7db592
5 years ago
version 3
33a0d16a
5 years ago
version 2
683f8a51
5 years ago
version 1
c92dc391
5 years ago
master (base)
and
version 4
latest version
8591558b
4 commits,
5 years ago
version 7
f9943c51
3 commits,
5 years ago
version 6
8b765dbf
2 commits,
5 years ago
version 5
b5d586f4
1 commit,
5 years ago
version 4
bc7db592
6 commits,
5 years ago
version 3
33a0d16a
4 commits,
5 years ago
version 2
683f8a51
3 commits,
5 years ago
version 1
c92dc391
2 commits,
5 years ago
Show latest version
1 file
+
7
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
tests/test_corrupted_files.py
+
7
−
0
Options
#!/usr/bin/env python3
import
unittest
import
time
import
shutil
import
os
import
logging
@@ -297,6 +298,12 @@ class TestCorruptedFiles(unittest.TestCase):
zout
.
add
(
'
./tests/data/dirty.docx
'
)
zout
.
add
(
'
./tests/data/dirty.jpg
'
)
zout
.
add
(
'
./tests/data/embedded_corrupted.docx
'
)
tarinfo
=
tarfile
.
TarInfo
(
name
=
'
./tests/data/dirty.png
'
)
tarinfo
.
mtime
=
time
.
time
()
tarinfo
.
uid
=
1337
tarinfo
.
gid
=
1338
with
open
(
'
./tests/data/dirty.png
'
,
'
rb
'
)
as
f
:
zout
.
addfile
(
tarinfo
,
f
)
p
,
mimetype
=
parser_factory
.
get_parser
(
'
./tests/data/clean.tar
'
)
self
.
assertEqual
(
mimetype
,
'
application/x-tar
'
)
meta
=
p
.
get_meta
()
Loading