diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-12-30 19:37:24 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-12-30 19:41:55 +0100 |
| commit | 87262c75c3e645358e6587b64c8bd2adca9477b2 (patch) | |
| tree | 1a9d93728f5edfaa049ddfad2639a3c5cdb64793 /tests/test_stt.py | |
| parent | 7d80c7d7b6c983cd631986b3c74672389c8916d9 (diff) | |
| download | jasper-client-87262c75c3e645358e6587b64c8bd2adca9477b2.tar.gz jasper-client-87262c75c3e645358e6587b64c8bd2adca9477b2.zip | |
Add skip conditions to unittests for dependency checking
Diffstat (limited to 'tests/test_stt.py')
| -rw-r--r-- | tests/test_stt.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_stt.py b/tests/test_stt.py index 267c1c2..cb33ff6 100644 --- a/tests/test_stt.py +++ b/tests/test_stt.py @@ -1,9 +1,30 @@ #!/usr/bin/env python2 # -*- coding: utf-8-*- import unittest +import imp from client import stt, jasperpath +def cmuclmtk_installed(): + try: + imp.find_module('cmuclmtk') + except ImportError: + return False + else: + return True + + +def pocketsphinx_installed(): + try: + imp.find_module('pocketsphinx') + except ImportError: + return False + else: + return True + + +@unittest.skipUnless(cmuclmtk_installed(), "CMUCLMTK not present") +@unittest.skipUnless(pocketsphinx_installed(), "Pocketsphinx not present") class TestSTT(unittest.TestCase): def setUp(self): |
