test(py-monitor): run test_returns_none_for_text

This commit is contained in:
hoelee committed 2026-02-12 09:00:00 +08:00
1 parent 3293132357
commit 0c579988b7
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()