[diffoscope] 01/05: Update dex_expected_diffs and test requirement to ensure test compatibility with enjarify >= 1.0.3. (Closes: #849142)
Chris Lamb
chris at chris-lamb.co.uk
Sat Dec 24 20:27:28 CET 2016
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository diffoscope.
commit 003ac0ef68874a5c4f94fb814fe91321d935eb9d
Author: Chris Lamb <lamby at debian.org>
Date: Sat Dec 24 18:57:38 2016 +0000
Update dex_expected_diffs and test requirement to ensure test compatibility with enjarify >= 1.0.3. (Closes: #849142)
---
tests/comparators/test_dex.py | 13 +++++++++++++
tests/data/dex_expected_diffs | 4 ++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/tests/comparators/test_dex.py b/tests/comparators/test_dex.py
index 3a09fdf..e4be2fc 100644
--- a/tests/comparators/test_dex.py
+++ b/tests/comparators/test_dex.py
@@ -18,6 +18,7 @@
# along with diffoscope. If not, see <https://www.gnu.org/licenses/>.
import pytest
+import subprocess
from diffoscope.config import Config
from diffoscope.comparators.dex import DexFile
@@ -30,6 +31,17 @@ from test_java import javap_version
dex1 = load_fixture(data('test1.dex'))
dex2 = load_fixture(data('test2.dex'))
+def enjarify_version():
+ # Module enjarify.typeinference appeared in enjarify 1.0.3. We use a call
+ # directly to the python3 binary over importing with this module to escape
+ # virtualenvs, etc.
+ if subprocess.call(
+ ('python3', '-c', 'import enjarify.typeinference'),
+ stderr=subprocess.PIPE,
+ ) == 0:
+ return '1.0.3'
+ return '1.0.2'
+
def test_identification(dex1):
assert isinstance(dex1, DexFile)
@@ -43,6 +55,7 @@ def differences(dex1, dex2):
@skip_unless_tools_exist('enjarify', 'zipinfo', 'javap')
@skip_unless_tool_is_at_least('javap', javap_version, '1.8')
+ at skip_unless_tool_is_at_least('enjarify', enjarify_version, '1.0.3')
def test_differences(differences):
assert differences[0].source1 == 'test1.jar'
assert differences[0].source2 == 'test2.jar'
diff --git a/tests/data/dex_expected_diffs b/tests/data/dex_expected_diffs
index 32aafd7..822c9cd 100644
--- a/tests/data/dex_expected_diffs
+++ b/tests/data/dex_expected_diffs
@@ -6,8 +6,8 @@
file security status: not encrypted
extended local header: no
file last modified on (DOS date/time): 1980 Jan 1 00:00:00
-- 32-bit CRC value (hex): fc227a58
-+ 32-bit CRC value (hex): 19c9f64e
+- 32-bit CRC value (hex): bc28236e
++ 32-bit CRC value (hex): 59c3af78
compressed size: 305 bytes
uncompressed size: 305 bytes
length of filename: 30 characters
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list