Skip to content

Commit 86b9c56

Browse files
committed
more test cases for thai_time()
1 parent f6f1845 commit 86b9c56

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_util.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,19 @@ def test_thai_time(self):
210210
self.assertIsNotNone(thai_time("13:30"))
211211
self.assertIsNotNone(thai_time("13:30", "6h"))
212212
self.assertIsNotNone(thai_time("13:30", "m6h"))
213+
self.assertIsNotNone(thai_time("15:30"))
214+
self.assertIsNotNone(thai_time("15:30", "6h"))
215+
self.assertIsNotNone(thai_time("15:30", "m6h"))
216+
self.assertIsNotNone(thai_time("18:30"))
217+
self.assertIsNotNone(thai_time("18:30", "6h"))
218+
self.assertIsNotNone(thai_time("18:30", "m6h"))
213219
self.assertIsNotNone(thai_time("19:30"))
214220
self.assertIsNotNone(thai_time("19:30", "6h"))
215221
self.assertIsNotNone(thai_time("19:30", "m6h"))
216222

223+
with self.assertRaises(NotImplementedError):
224+
thai_time("8:17", fmt="xx")
225+
217226
# ### pythainlp.util.normalize
218227

219228
def test_delete_tone(self):

0 commit comments

Comments
 (0)