Skip to content

Commit

Permalink
Add test of supported languages
Browse files Browse the repository at this point in the history
  • Loading branch information
aryamccarthy committed Jun 7, 2020
1 parent 521d886 commit 9bb6e01
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_tweet_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import unittest
from typing import List

import littlebird
from littlebird import TweetTokenizer


Expand Down Expand Up @@ -44,6 +45,14 @@ def test_default_tokenize(self):
]
self.assertListEqual(tokenized, right_answer)

def test_supported_langs(self):
with self.assertRaises(littlebird.tweet_tokenizer.LanguageNotSupportedError):
tokenizer = TweetTokenizer(language="zxx")
with self.assertRaises(littlebird.tweet_tokenizer.LanguageNotSupportedError):
tokenizer = TweetTokenizer(language="es")
with self.assertRaises(littlebird.tweet_tokenizer.LanguageNotSupportedError):
tokenizer = TweetTokenizer(language="english")


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

0 comments on commit 9bb6e01

Please sign in to comment.