From 87262c75c3e645358e6587b64c8bd2adca9477b2 Mon Sep 17 00:00:00 2001 From: schneefux Date: Tue, 30 Dec 2014 19:37:24 +0100 Subject: Add skip conditions to unittests for dependency checking --- tests/test_vocabcompiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/test_vocabcompiler.py') diff --git a/tests/test_vocabcompiler.py b/tests/test_vocabcompiler.py index 561440a..f9e427f 100644 --- a/tests/test_vocabcompiler.py +++ b/tests/test_vocabcompiler.py @@ -90,8 +90,8 @@ class TestVocabulary(unittest.TestCase): self.vocab.compile(phrases, force=True) -@unittest.skipIf(vocabcompiler.cmuclmtk is None, - "CMUCLMTK not present") +@unittest.skipUnless(hasattr(vocabcompiler, 'cmuclmtk'), + "CMUCLMTK not present") class TestPocketsphinxVocabulary(TestVocabulary): VOCABULARY = vocabcompiler.PocketsphinxVocabulary -- cgit v1.3.1