[Git][reproducible-builds/diffoscope][master] Add support for file 5.37. (Closes: #57)
Chris Lamb
gitlab at salsa.debian.org
Mon Jul 8 14:48:01 UTC 2019
Chris Lamb pushed to branch master at Reproducible Builds / diffoscope
Commits:
60fac599 by Chris Lamb at 2019-07-08T14:47:45Z
Add support for file 5.37. (Closes: #57)
- - - - -
11 changed files:
- tests/comparators/test_containers.py
- tests/comparators/test_deb.py
- tests/comparators/test_gzip.py
- tests/comparators/test_ipk.py
- tests/data/archive12.diff.txt
- tests/data/containers/magic_gzip
- tests/data/gzip_metadata_expected_diff
- tests/data/ipk_metadata_expected_diff
- tests/data/quine_expected_diff
- tests/test_presenters.py
- tests/test_quines.py
Changes:
=====================================
tests/comparators/test_containers.py
=====================================
@@ -66,7 +66,7 @@ def expected_type_diff(ext1, ext2):
@skip_unless_tools_exist('xz')
- at skip_unless_file_version_is_at_least('5.33')
+ at skip_unless_file_version_is_at_least('5.37')
def test_equal(set1):
for x, y in itertools.product(TYPES, TYPES):
diff = set1[x].compare(set1[y])
@@ -84,7 +84,7 @@ def test_equal(set1):
@skip_unless_tools_exist('xz')
- at skip_unless_file_version_is_at_least('5.33')
+ at skip_unless_file_version_is_at_least('5.37')
def test_different(set1, set2):
for x, y in itertools.product(TYPES, TYPES):
expected_diff = get_data('containers/different_files_expected_diff')
=====================================
tests/comparators/test_deb.py
=====================================
@@ -27,7 +27,10 @@ from diffoscope.comparators.binary import FilesystemFile
from diffoscope.comparators.missing_file import MissingFile
from diffoscope.comparators.utils.specialize import specialize
-from ..utils.tools import skip_unless_tools_exist
+from ..utils.tools import (
+ skip_unless_tools_exist,
+ skip_unless_file_version_is_at_least,
+)
from ..utils.data import load_fixture, get_data
@@ -146,13 +149,14 @@ bug903565_deb2 = load_fixture('bug903565_2.deb')
@skip_unless_tools_exist('xz')
+ at skip_unless_file_version_is_at_least('5.37')
def test_compare_different_compression(bug881937_deb1, bug881937_deb2):
difference = bug881937_deb1.compare(bug881937_deb2)
- assert difference.details[1].source1 == 'control.tar.gz'
- assert difference.details[1].source2 == 'control.tar.xz'
+ assert difference.details[2].source1 == 'control.tar.gz'
+ assert difference.details[2].source2 == 'control.tar.xz'
expected_diff = get_data('bug881937_control_expected_diff')
assert (
- difference.details[1].details[2].details[1].unified_diff
+ difference.details[2].details[2].details[1].unified_diff
== expected_diff
)
=====================================
tests/comparators/test_gzip.py
=====================================
@@ -61,7 +61,7 @@ def differences(gzip1, gzip2):
return gzip1.compare(gzip2).details
- at skip_unless_file_version_is_at_least('5.33')
+ at skip_unless_file_version_is_at_least('5.37')
def test_metadata(differences):
assert differences[0].source1.startswith('filetype')
assert differences[0].source2.startswith('filetype')
=====================================
tests/comparators/test_ipk.py
=====================================
@@ -45,7 +45,7 @@ def differences(ipk1, ipk2):
return ipk1.compare(ipk2).details
- at skip_unless_file_version_is_at_least('5.33')
+ at skip_unless_file_version_is_at_least('5.37')
def test_metadata(differences):
assert differences[0].source1.startswith('filetype')
expected_diff = get_data('ipk_metadata_expected_diff')
=====================================
tests/data/archive12.diff.txt
=====================================
@@ -7,8 +7,8 @@
├── compressed.gz
│ ├── filetype from file(1)
│ │ @@ -1 +1 @@
-│ │ -gzip compressed data, max compression, from Unix, original size 2
-│ │ +gzip compressed data, was "compressed", last modified: Sun Mar 19 22:27:42 2017, max compression, from Unix, original size 2
+│ │ -gzip compressed data, max compression, from Unix, original size modulo 2^32 2
+│ │ +gzip compressed data, was "compressed", last modified: Sun Mar 19 22:27:42 2017, max compression, from Unix, original size modulo 2^32 2
│ ├── compressed
│ │ @@ -1 +1 @@
│ │ -a
=====================================
tests/data/containers/magic_gzip
=====================================
@@ -1 +1 @@
-gzip compressed data, last modified: Sun Sep 10 22:19:44 2017, from Unix, original size 10240
+gzip compressed data, last modified: Sun Sep 10 22:19:44 2017, from Unix, original size modulo 2^32 10240
=====================================
tests/data/gzip_metadata_expected_diff
=====================================
@@ -1,3 +1,3 @@
@@ -1 +1 @@
--gzip compressed data, last modified: Tue Jun 23 10:12:28 2015, max compression, from Unix, original size 446
-+gzip compressed data, last modified: Tue Jun 23 10:12:28 2015, from Unix, original size 671
+-gzip compressed data, last modified: Tue Jun 23 10:12:28 2015, max compression, from Unix, original size modulo 2^32 446
++gzip compressed data, last modified: Tue Jun 23 10:12:28 2015, from Unix, original size modulo 2^32 671
=====================================
tests/data/ipk_metadata_expected_diff
=====================================
@@ -1,3 +1,3 @@
@@ -1 +1 @@
--gzip compressed data, last modified: Mon May 18 23:26:52 2015, from Unix, original size 61440
-+gzip compressed data, last modified: Mon Jun 8 17:31:21 2015, from Unix, original size 61440
+-gzip compressed data, last modified: Mon May 18 23:26:52 2015, from Unix, original size modulo 2^32 61440
++gzip compressed data, last modified: Mon Jun 8 17:31:21 2015, from Unix, original size modulo 2^32 61440
=====================================
tests/data/quine_expected_diff
=====================================
@@ -1,3 +1,3 @@
@@ -1 +1 @@
--gzip compressed data, was "recursive", from FAT filesystem (MS-DOS, OS/2, NT), original size 250
+-gzip compressed data, was "recursive", from FAT filesystem (MS-DOS, OS/2, NT), original size modulo 2^32 250
+Zip archive data, at least v2.0 to extract
=====================================
tests/test_presenters.py
=====================================
@@ -86,7 +86,7 @@ def test_text_option_is_default(capsys):
assert out == get_data('output.txt')
- at skip_unless_file_version_is_at_least('5.33')
+ at skip_unless_file_version_is_at_least('5.37')
def test_text_proper_indentation(capsys):
out = run(capsys, pair=('archive1.tar', 'archive2.tar'))
=====================================
tests/test_quines.py
=====================================
@@ -52,7 +52,7 @@ def differences(quine1, quine2):
return quine1.compare(quine2).details
- at skip_unless_file_version_is_at_least('5.33')
+ at skip_unless_file_version_is_at_least('5.37')
def test_difference(differences):
expected_diff = get_data('quine_expected_diff')
assert differences[0].unified_diff == expected_diff
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/60fac5992a53ee1f15c184a1f0ca25620afe7192
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/60fac5992a53ee1f15c184a1f0ca25620afe7192
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20190708/af4d7f61/attachment.html>
More information about the rb-commits
mailing list