From c1ffb7015cf7385f5e374d0958d7d57bd3fdd31d Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 19 Sep 2014 12:02:10 +0200 Subject: Use jasperpath in client/test.py --- client/test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'client') 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): -- cgit v1.3.1