[diffoscope] 01/01: Skip dbgsym tests if the debian Python module is not available

Jérémy Bobbio lunar at moszumanska.debian.org
Sat Jan 23 23:09:44 CET 2016


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch master
in repository diffoscope.

commit 3b1a28f9d48389ff6733fad18e92c40001ee9ec6
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Sat Jan 23 22:09:23 2016 +0000

    Skip dbgsym tests if the debian Python module is not available
---
 tests/comparators/test_elf.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/comparators/test_elf.py b/tests/comparators/test_elf.py
index 9007181..95fa947 100644
--- a/tests/comparators/test_elf.py
+++ b/tests/comparators/test_elf.py
@@ -21,6 +21,11 @@ import os.path
 import pytest
 from diffoscope.comparators import specialize
 from diffoscope.comparators.binary import FilesystemFile, NonExistingFile
+try:
+    import diffoscope.comparators.debian
+    miss_debian_module = False
+except ImportError:
+    miss_debian_module = True
 from diffoscope.comparators.directory import FilesystemDirectory
 from diffoscope.comparators.elf import ElfFile, StaticLibFile
 from diffoscope.config import Config
@@ -119,6 +124,7 @@ def dbgsym_differences(dbgsym_dir1, dbgsym_dir2):
     return dbgsym_dir1.compare(dbgsym_dir2)
 
 @pytest.mark.skipif(any([tool_missing(tool) for tool in ['readelf', 'objdump', 'objcopy']]), reason='missing readelf, objdump, or objcopy')
+ at pytest.mark.skipif(miss_debian_module, reason='debian module is not installed')
 def test_differences_with_dbgsym(dbgsym_differences):
     output_text(dbgsym_differences, print)
     assert dbgsym_differences.details[2].source1 == 'data.tar.xz'
@@ -128,6 +134,7 @@ def test_differences_with_dbgsym(dbgsym_differences):
     assert 'test-cases/dbgsym/package/test.c:2' in bin_details.details[1].unified_diff
 
 @pytest.mark.skipif(any([tool_missing(tool) for tool in ['readelf', 'objdump', 'objcopy']]), reason='missing readelf, objdump, or objcopy')
+ at pytest.mark.skipif(miss_debian_module, reason='debian module is not installed')
 def test_original_gnu_debuglink(dbgsym_differences):
     bin_details = dbgsym_differences.details[2].details[0].details[0]
     assert '.gnu_debuglink' in bin_details.details[2].source1

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list