diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-07-11 09:38:42 -0700 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-07-11 09:38:42 -0700 |
| commit | 43eebc44166da07388a2e932d1234090fda957ec (patch) | |
| tree | d5cc1793a0b6269df71cce2b58ea099c60e4e455 /boot/test.py | |
| parent | ea082f844a6748141aa61143421e4e9d0cc19bda (diff) | |
| parent | 8a5e5ed385a5c467260c2f1b20816a66cebfc1c6 (diff) | |
| download | jasper-client-43eebc44166da07388a2e932d1234090fda957ec.tar.gz jasper-client-43eebc44166da07388a2e932d1234090fda957ec.zip | |
Merge pull request #100 from astahlman/master
Platform independent audio output. Stop hardcoding /home/jasper.
Diffstat (limited to 'boot/test.py')
| -rw-r--r-- | boot/test.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/boot/test.py b/boot/test.py index c6bd3ff..af5f982 100644 --- a/boot/test.py +++ b/boot/test.py @@ -1,4 +1,8 @@ import os + +if os.environ.get('JASPER_HOME') is None: + os.environ['JASPER_HOME'] = '/home/pi' + import sys import unittest from mock import patch @@ -12,6 +16,10 @@ sys.path.append(mod_path) import g2p +class UnorderedList(list): + def __eq__(self, other): + return sorted(self) == sorted(other) + class TestVocabCompiler(unittest.TestCase): @@ -33,7 +41,7 @@ class TestVocabCompiler(unittest.TestCase): # 'words' is appended with ['MUSIC', 'SPOTIFY'] # so must be > 2 to have received WORDS from modules - translateWords.assert_called_once_with(words) + translateWords.assert_called_once_with(UnorderedList(words)) self.assertTrue(text2lm.called) os.remove(sentences) os.remove(dictionary) |
