diff --git a/platform/py-monitor/tests/test_core.py b/platform/py-monitor/tests/test_core.py index 1e116397..431ffe30 100644 --- a/platform/py-monitor/tests/test_core.py +++ b/platform/py-monitor/tests/test_core.py @@ -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()