[diffoscope] 01/04: Skip Haskell tests if GHC is not installed.

Chris Lamb chris at chris-lamb.co.uk
Sat Aug 20 21:29:54 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 428f0792fefe96aaf5dfe5a42ae7ae61475e4d4b
Author: Chris Lamb <lamby at debian.org>
Date:   Sat Aug 20 19:18:24 2016 +0100

    Skip Haskell tests if GHC is not installed.
---
 tests/comparators/test_haskell.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/comparators/test_haskell.py b/tests/comparators/test_haskell.py
index dd5c7c7..63e7803 100644
--- a/tests/comparators/test_haskell.py
+++ b/tests/comparators/test_haskell.py
@@ -23,7 +23,7 @@ from diffoscope.comparators import specialize
 from diffoscope.comparators.binary import FilesystemFile
 from diffoscope.comparators.haskell import HiFile
 
-from conftest import data
+from conftest import data, tool_missing
 
 TEST_FILE1_PATH = data('test1.hi')
 TEST_FILE2_PATH = data('test2.hi')
@@ -36,6 +36,7 @@ def haskell1():
 def haskell2():
     return specialize(FilesystemFile(TEST_FILE2_PATH))
 
+ at pytest.mark.skipif(tool_missing('ghc'), reason='missing ghc')
 def test_identification(haskell1):
     assert isinstance(haskell1, HiFile)
 
@@ -46,6 +47,7 @@ def test_no_differences(haskell1):
 def differences(haskell1, haskell2):
     return haskell1.compare(haskell2).details
 
+ at pytest.mark.skipif(tool_missing('ghc'), reason='missing ghc')
 def test_diff(differences):
     with open(data('haskell_expected_diff')) as f:
         expected_diff = f.read()

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


More information about the diffoscope mailing list