Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
diffoscope
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Reproducible Builds
diffoscope
Commits
31a6a56a
Commit
31a6a56a
authored
1 year ago
by
Chris Lamb
Browse files
Options
Downloads
Patches
Plain Diff
Fix tests for 7zip 24.05.
parent
850c1ffa
No related branches found
No related tags found
No related merge requests found
Pipeline
#680007
failed
1 year ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/comparators/test_sevenz.py
+12
-2
12 additions, 2 deletions
tests/comparators/test_sevenz.py
tests/data/text_sevenzmetadata_expected_diff
+2
-2
2 additions, 2 deletions
tests/data/text_sevenzmetadata_expected_diff
with
14 additions
and
4 deletions
tests/comparators/test_sevenz.py
+
12
−
2
View file @
31a6a56a
...
...
@@ -16,8 +16,9 @@
# You should have received a copy of the GNU General Public License
# along with diffoscope. If not, see <https://www.gnu.org/licenses/>.
import
shutil
import
pytest
import
shutil
import
subprocess
from
diffoscope.comparators.gzip
import
GzipFile
from
diffoscope.comparators.sevenz
import
SevenZFile
...
...
@@ -25,13 +26,21 @@ from diffoscope.comparators.binary import FilesystemFile
from
diffoscope.comparators.utils.specialize
import
specialize
from
..utils.data
import
load_fixture
,
assert_diff
from
..utils.tools
import
skip_unless_tools_exist
from
..utils.tools
import
skip_unless_tools_exist
,
skip_unless_tool_is_at_least
from
..utils.nonexisting
import
assert_non_existing
sevenza
=
load_fixture
(
"
test1.disk.gz
"
)
sevenzb
=
load_fixture
(
"
test2.disk.gz
"
)
def
sevenz_version
():
try
:
out
=
subprocess
.
check_output
([
"
7z
"
])
except
subprocess
.
CalledProcessError
as
e
:
out
=
e
.
output
return
out
.
decode
(
"
UTF-8
"
).
split
()[
1
].
strip
()
def
test_identification
(
sevenza
):
assert
isinstance
(
sevenza
,
GzipFile
)
...
...
@@ -69,6 +78,7 @@ def test_content_source_without_extension(tmpdir, sevenza, sevenzb):
@skip_unless_tools_exist
(
"
7z
"
)
@skip_unless_tool_is_at_least
(
"
7z
"
,
sevenz_version
,
"
24.05
"
)
def
test_metadata_diff
(
differences
):
assert_diff
(
differences
[
0
].
details
[
0
],
"
text_sevenzmetadata_expected_diff
"
)
...
...
This diff is collapsed.
Click to expand it.
tests/data/text_sevenzmetadata_expected_diff
+
2
−
2
View file @
31a6a56a
@@ -5,13 +5,13 @@
Scanning the drive for archives:
@@ -6,13 +6,13 @@
1 file, 131072 bytes (128 KiB)
--
Type = GPT
Physical Size = 131072
Sector Size = 512
-ID = BEFEFA22-EED4-4977-8407-46CD48ABC5D9
+ID = A2E15781-E1B6-422C-BA65-9210D36BE3AA
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment