diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-12-30 20:17:15 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-12-30 20:17:15 +0100 |
| commit | 9b7bfec7af923812fdcf5c9faeb98c7c611ea6de (patch) | |
| tree | 3cdbcf02fc217ea70b80f6a901173b1acb92cebf /tests/test_vocabcompiler.py | |
| parent | 87262c75c3e645358e6587b64c8bd2adca9477b2 (diff) | |
| download | jasper-client-9b7bfec7af923812fdcf5c9faeb98c7c611ea6de.tar.gz jasper-client-9b7bfec7af923812fdcf5c9faeb98c7c611ea6de.zip | |
Avoid skipping too many tests (raises test coverage on travis-ci)
Diffstat (limited to 'tests/test_vocabcompiler.py')
| -rw-r--r-- | tests/test_vocabcompiler.py | 12 |
1 files changed, 4 insertions, 8 deletions
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() |
