Skip to content

Commit

Permalink
[add] Adding a unit test for text_to_speech
Browse files Browse the repository at this point in the history
  • Loading branch information
Animenosekai committed Apr 25, 2021
1 parent 67b5a80 commit f4b03e0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,16 @@ def test_example():
print("[test] --> Testing Translator.example")
assert t.example("Hello", "japanese") is not None


def test_dictionary():
print("[test] --> Testing Translator.dictionary")
#assert t.dictionary("Hello", "Japanese") is not None
# I can't test dictionary as DeepL is very strict on their rate-limit

def test_text_to_speech():
print("[test] --> Testing Translator.text_to_speech")
assert t.text_to_speech("Hello, how are you?", "English") is not None

def test_imports():
print("[test] --> Testing imports")
from translatepy.data import data
Expand Down

0 comments on commit f4b03e0

Please sign in to comment.