Skip to content

Commit

Permalink
Add test case to validate available languages (#21)
Browse files Browse the repository at this point in the history
* Add test case to validate available languages

* Fix typo in test case
Resolve variable name warning

---------

Co-authored-by: Daniel McKnight <daniel@neon.ai>
  • Loading branch information
NeonDaniel and NeonDaniel authored Apr 26, 2024
1 parent 84c95ee commit cd7ad79
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_stt.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ def test_get_stt(self):
result = self.stt.execute(audio)
self.assertIn(transcription, result)

def test_available_languages(self):
langs = self.stt.available_languages
self.assertIsInstance(langs, set)
self.assertTrue(all((isinstance(lang, str) for lang in langs)))
self.assertIn("en", langs)


if __name__ == '__main__':
unittest.main()

0 comments on commit cd7ad79

Please sign in to comment.