Skip to content

Commit 282ed1d

Browse files
committed
Add test_tag to __init__
1 parent cd5fe72 commit 282ed1d

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Diff for: tests/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"tests.test_morpheme",
1818
"tests.test_soundex",
1919
"tests.test_spell",
20+
"tests.test_tag",
2021
"tests.test_tokenize",
2122
"tests.test_tools",
2223
"tests.test_transliterate",

Diff for: tests/testx_tokenize.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
# Tests for functions that need external imports
3737
class TokenizeTestCaseX(unittest.TestCase):
38-
def testx_subword_tokenize(self):
38+
def test_subword_tokenize(self):
3939
self.assertEqual(subword_tokenize(None, engine="ssg"), [])
4040
self.assertEqual(subword_tokenize(None, engine="han_solo"), [])
4141
self.assertEqual(
@@ -88,7 +88,7 @@ def testx_subword_tokenize(self):
8888
subword_tokenize("โควิด19", engine="wangchanberta"), list
8989
)
9090

91-
def testx_sent_tokenize(self):
91+
def test_sent_tokenize(self):
9292
# Use default engine (crfcut)
9393
self.assertEqual(sent_tokenize(None), [])
9494
self.assertEqual(sent_tokenize(""), [])
@@ -188,7 +188,7 @@ def testx_sent_tokenize(self):
188188
# ),
189189
# )
190190

191-
def testx_word_tokenize(self):
191+
def test_word_tokenize(self):
192192
self.assertIsNotNone(word_tokenize(TEXT_1, engine="nlpo3"))
193193
self.assertIsNotNone(word_tokenize(TEXT_1, engine="attacut"))
194194
self.assertIsNotNone(word_tokenize(TEXT_1, engine="deepcut"))

Diff for: tests/testx_util.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
class UtilTestCaseX(unittest.TestCase):
16-
def testx_rhyme(self):
16+
def test_rhyme(self):
1717
self.assertIsInstance(rhyme("แมว"), list)
1818
self.assertTrue(len(rhyme("แมว")) > 2)
1919

@@ -25,7 +25,7 @@ def test_spell_word(self):
2525
spell_word("คนดี"), ["คอ", "นอ", "คน", "ดอ", "อี", "ดี", "คนดี"]
2626
)
2727

28-
def testx_thai_word_tone_detector(self):
28+
def test_thai_word_tone_detector(self):
2929
self.assertIsNotNone(thai_word_tone_detector("คนดี"))
3030
self.assertEqual(
3131
thai_word_tone_detector("ราคา"), [("รา", "m"), ("คา", "m")]

0 commit comments

Comments
 (0)