[diffoscope] 03/05: tests: Ensure we can at least import the "deb_fallback" and "rpm_fallback" modules.
Chris Lamb
chris at chris-lamb.co.uk
Sat Feb 4 02:45:27 UTC 2017
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository diffoscope.
commit fe9c9ba5e4480891a83c076e7beed08763282589
Author: Chris Lamb <lamby at debian.org>
Date: Sat Feb 4 15:04:25 2017 +1300
tests: Ensure we can at least import the "deb_fallback" and "rpm_fallback" modules.
Signed-off-by: Chris Lamb <lamby at debian.org>
---
tests/comparators/test_debian.py | 9 +++++++++
tests/comparators/test_rpm.py | 10 ++++++++++
2 files changed, 19 insertions(+)
diff --git a/tests/comparators/test_debian.py b/tests/comparators/test_debian.py
index 335d07f..f3b1c0b 100644
--- a/tests/comparators/test_debian.py
+++ b/tests/comparators/test_debian.py
@@ -21,6 +21,7 @@ import shutil
import pytest
from diffoscope.config import Config
+from diffoscope.comparators import ComparatorManager
from diffoscope.comparators.binary import FilesystemFile
from diffoscope.comparators.missing_file import MissingFile
from diffoscope.comparators.utils.specialize import specialize
@@ -240,3 +241,11 @@ def test_dot_buildinfo_internal_diff(dot_buildinfo_differences):
@pytest.mark.skipif(miss_debian_module, reason='debian module is not installed')
def test_dot_buildinfo_compare_non_existing(monkeypatch, dot_buildinfo1):
assert_non_existing(monkeypatch, dot_buildinfo1)
+
+def test_fallback_import(monkeypatch):
+ # Ensure that we can at least import the fallback module
+ manager = ComparatorManager()
+ monkeypatch.setattr(manager, 'COMPARATORS', (
+ ('debian_fallback.DotChangesFile',),
+ ))
+ manager.reload()
diff --git a/tests/comparators/test_rpm.py b/tests/comparators/test_rpm.py
index 62b3072..33618a8 100644
--- a/tests/comparators/test_rpm.py
+++ b/tests/comparators/test_rpm.py
@@ -19,6 +19,8 @@
import pytest
+from diffoscope.comparators import ComparatorManager
+
from utils.data import load_fixture, get_data
from utils.tools import skip_unless_tools_exist
from utils.nonexisting import assert_non_existing
@@ -73,3 +75,11 @@ def test_content(differences):
@skip_unless_tools_exist('rpm2cpio')
def test_compare_non_existing(monkeypatch, rpm1):
assert_non_existing(monkeypatch, rpm1)
+
+def test_fallback_import(monkeypatch):
+ # Ensure that we can at least import the fallback module
+ manager = ComparatorManager()
+ monkeypatch.setattr(manager, 'COMPARATORS', (
+ ('rpm_fallback.RpmFile',),
+ ))
+ manager.reload()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the Reproducible-commits
mailing list