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

This commit is contained in:
hoelee committed 2026-10-16 11:12:00 +08:00
1 parent 6be65312b0
commit 0ac7456989
1 file changed
+8
+8
View File
@@ -37,6 +37,14 @@ class PriceTests(unittest.TestCase):
def test_parses_thousands_separator(self):
self.assertEqual(1250.5, parse_price("RM 1,250.50"))
def test_parses_foreign_currency_prefix(self):
self.assertEqual(12.0, parse_price("S$ 12"))
def test_returns_none_for_text(self):
self.assertIsNone(parse_price("Free"))
self.assertIsNone(parse_price(""))
self.assertIsNone(parse_price(None))
if __name__ == "__main__":
unittest.main()