Skip to content

Commit 0a2139d

Browse files
author
Joshua B. Smith
committed
Fixes path issue in test
The test path wasn't setup to work properly in travis.
1 parent f4a218e commit 0a2139d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/test_speech_to_text_v1.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,11 @@ def test_custom_corpora():
128128

129129
speech_to_text.list_corpora(customization_id='customid')
130130

131-
file_path = './resources/speech_to_text/corpus-short-1.txt'
132-
with open(file_path) as f:
131+
file_path = '../resources/speech_to_text/corpus-short-1.txt'
132+
full_path = os.path.join(os.path.dirname(__file__), file_path)
133+
with open(full_path) as corpus_file:
133134
speech_to_text.add_corpora(customization_id='customid',
134-
corpus_name="corpus",file=f)
135+
corpus_name="corpus",file=corpus_file)
135136

136137
speech_to_text.get_corpus(customization_id='customid',
137138
corpus_name='corpus')

0 commit comments

Comments
 (0)