summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-09-19 12:02:10 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2014-09-19 12:10:15 +0200
commitc1ffb7015cf7385f5e374d0958d7d57bd3fdd31d (patch)
tree4aae3451b7ebf8801f6b06945b91eb9717519226
parenta9f275825fa784ebc85cdcfb3aad5a7e02e7f01b (diff)
downloadjasper-client-c1ffb7015cf7385f5e374d0958d7d57bd3fdd31d.tar.gz
jasper-client-c1ffb7015cf7385f5e374d0958d7d57bd3fdd31d.zip
Use jasperpath in client/test.py
-rw-r--r--client/test.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/test.py b/client/test.py
index 8925e66..a731951 100644
--- a/client/test.py
+++ b/client/test.py
@@ -14,6 +14,7 @@ import test_mic
import vocabcompiler
import g2p
import brain
+import jasperpath
from diagnose import Diagnostics
DEFAULT_PROFILE = {
@@ -59,8 +60,8 @@ class TestVocabCompiler(unittest.TestCase):
class TestMic(unittest.TestCase):
def setUp(self):
- self.jasper_clip = "../static/audio/jasper.wav"
- self.time_clip = "../static/audio/time.wav"
+ self.jasper_clip = jasperpath.data('audio', 'jasper.wav')
+ self.time_clip = jasperpath.data('audio', 'time.wav')
from stt import PocketSphinxSTT
self.stt = PocketSphinxSTT()
@@ -134,7 +135,7 @@ class TestModules(unittest.TestCase):
inputs = ["Who's there?", "Random response"]
outputs = self.runConversation(query, inputs, Joke)
self.assertEqual(len(outputs), 3)
- allJokes = open("../static/text/JOKES.txt", "r").read()
+ allJokes = open(jasperpath.data('text','JOKES.txt'), 'r').read()
self.assertTrue(outputs[2] in allJokes)
def testTime(self):