[diffoscope] 01/03: Use `pytest.xfail` over `assert False`.

Chris Lamb chris at chris-lamb.co.uk
Sun Aug 21 21:15:05 CEST 2016


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

lamby pushed a commit to branch master
in repository diffoscope.

commit eb60f70dbf3f1e370c03a10d58cd4b102d6a8482
Author: Chris Lamb <lamby at debian.org>
Date:   Sun Aug 21 20:01:27 2016 +0100

    Use `pytest.xfail` over `assert False`.
---
 tests/comparators/test_utils.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/comparators/test_utils.py b/tests/comparators/test_utils.py
index 6f9fd89..fda5ae9 100644
--- a/tests/comparators/test_utils.py
+++ b/tests/comparators/test_utils.py
@@ -38,11 +38,11 @@ fuzzy_tar3 = load_fixture(data('fuzzy3.tar'))
 
 @skip_unless_tools_exist()
 def test_skip_unless_tools_exist_empty():
-    assert False, "Test should always be skipped"
+    pytest.xfail("Test should always be skipped")
 
 @skip_unless_tools_exist('/missing')
 def test_skip_unless_tools_exist_missing():
-    assert False, "Test should always be skipped"
+    pytest.xfail("Test should always be skipped")
 
 @pytest.mark.skipif(miss_tlsh, reason='tlsh is missing')
 def test_fuzzy_matching(fuzzy_tar1, fuzzy_tar2):

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


More information about the diffoscope mailing list