From 9b7bfec7af923812fdcf5c9faeb98c7c611ea6de Mon Sep 17 00:00:00 2001 From: schneefux Date: Tue, 30 Dec 2014 20:17:15 +0100 Subject: Avoid skipping too many tests (raises test coverage on travis-ci) --- tests/test_vocabcompiler.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'tests/test_vocabcompiler.py') diff --git a/tests/test_vocabcompiler.py b/tests/test_vocabcompiler.py index f9e427f..2ce977d 100644 --- a/tests/test_vocabcompiler.py +++ b/tests/test_vocabcompiler.py @@ -90,22 +90,19 @@ class TestVocabulary(unittest.TestCase): self.vocab.compile(phrases, force=True) -@unittest.skipUnless(hasattr(vocabcompiler, 'cmuclmtk'), - "CMUCLMTK not present") class TestPocketsphinxVocabulary(TestVocabulary): VOCABULARY = vocabcompiler.PocketsphinxVocabulary + @unittest.skipUnless(hasattr(vocabcompiler, 'cmuclmtk'), + "CMUCLMTK not present") def testVocabulary(self): super(TestPocketsphinxVocabulary, self).testVocabulary() self.assertIsInstance(self.vocab.decoder_kwargs, dict) self.assertIn('lm', self.vocab.decoder_kwargs) self.assertIn('dict', self.vocab.decoder_kwargs) - -class TestPatchedPocketsphinxVocabulary(TestPocketsphinxVocabulary): - - def testVocabulary(self): + def testPatchedVocabulary(self): def write_test_vocab(text, output_file): with open(output_file, "w") as f: @@ -135,5 +132,4 @@ class TestPatchedPocketsphinxVocabulary(TestPocketsphinxVocabulary): mocked_cmuclmtk.text2vocab = write_test_vocab mocked_cmuclmtk.text2lm = write_test_lm with mock.patch('client.vocabcompiler.PhonetisaurusG2P', DummyG2P): - super(TestPatchedPocketsphinxVocabulary, - self).testVocabulary() + self.testVocabulary() -- cgit v1.3.1