mirror of
https://github.com/storytold/storyteller-ml.git
synced 2026-10-17 00:23:14 +00:00
tests
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
from tts.text.pipeline.english_pipeline_v1 import EnglishPipelineV1
|
||||
|
||||
|
||||
class TestEnglishPipelineV1:
|
||||
|
||||
def test_no_input(self):
|
||||
pipeline = EnglishPipelineV1()
|
||||
output = pipeline.user_input_to_sequence("")
|
||||
assert output == []
|
||||
|
||||
def test_whitespace(self):
|
||||
pipeline = EnglishPipelineV1()
|
||||
output = pipeline.user_input_to_sequence(" \n \t ")
|
||||
assert output == []
|
||||
|
||||
def test_single_word(self):
|
||||
pipeline = EnglishPipelineV1()
|
||||
output = pipeline.user_input_to_sequence("hello")
|
||||
assert output == [106, 73, 117, 123] # NB: Arpabet encoded
|
||||
|
||||
def test_two_words(self):
|
||||
pipeline = EnglishPipelineV1()
|
||||
output = pipeline.user_input_to_sequence("hello hello")
|
||||
assert output == [106, 73, 117, 123, 11, 106, 73, 117, 123]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user