feat(py-monitor): add test_core.py()

This commit is contained in:
hoelee committed 2026-10-19 11:12:00 +08:00
1 parent f1504968a2
commit 72cb56500c
1 file changed
+8
+8
View File
@@ -56,6 +56,14 @@ class KeywordTests(unittest.TestCase):
def test_case_insensitive_match(self):
self.assertTrue(title_matches_keyword("iPhone 13 PROTECTOR", ["protector"]))
def test_no_match(self):
self.assertFalse(title_matches_keyword("iPhone 13", ["samsung"]))
def test_empty_inputs(self):
self.assertFalse(title_matches_keyword("", ["x"]))
self.assertFalse(title_matches_keyword("x", []))
if __name__ == "__main__":
unittest.main()