[diffoscope] 01/02: Rewrite find_spec line as a separate method for next commit.
Chris Lamb
chris at chris-lamb.co.uk
Thu Feb 9 21:23:32 CET 2017
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository diffoscope.
commit 8b454a9ee20092d455b466c067ca57f262ecf6bb
Author: Chris Lamb <lamby at debian.org>
Date: Fri Feb 10 09:15:01 2017 +1300
Rewrite find_spec line as a separate method for next commit.
Gbp-Dch: ignore.
Signed-off-by: Chris Lamb <lamby at debian.org>
---
tests/comparators/utils/tools.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/comparators/utils/tools.py b/tests/comparators/utils/tools.py
index f0a0113..0b07a44 100644
--- a/tests/comparators/utils/tools.py
+++ b/tests/comparators/utils/tools.py
@@ -62,7 +62,10 @@ def get_supported_elf_formats():
).decode('utf-8').splitlines())
def skip_unless_module_exists(name):
+ def module_exists(x):
+ return importlib.util.find_spec(x) is None
+
return pytest.mark.skipif(
- importlib.util.find_spec(name) is None,
+ module_exists(name),
reason="requires {} module".format(name),
)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list