diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-12-30 20:25:32 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-12-30 20:25:32 +0100 |
| commit | 026a3217c99f0be2a55afe4097fc881f1587940f (patch) | |
| tree | 3cdbcf02fc217ea70b80f6a901173b1acb92cebf /tests/test_vocabcompiler.py | |
| parent | ec3e900b05d07b228f68ed2ab42bfd545ac06b92 (diff) | |
| parent | 9b7bfec7af923812fdcf5c9faeb98c7c611ea6de (diff) | |
| download | jasper-client-026a3217c99f0be2a55afe4097fc881f1587940f.tar.gz jasper-client-026a3217c99f0be2a55afe4097fc881f1587940f.zip | |
Merge pull request #271 from Holzhaus/avoid-unittest-skipping
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() |
