diff --git a/client/test/test_pdd_collect_service.py b/client/test/test_pdd_collect_service.py index dc4cbac..cc551d8 100644 --- a/client/test/test_pdd_collect_service.py +++ b/client/test/test_pdd_collect_service.py @@ -702,6 +702,15 @@ class PddCollectParserTest(unittest.TestCase): self.assertNotEqual(service._color_view_signature(latest_xml), previous) self.assertEqual(clock.sleeps, [0.1, 0.1]) + def test_color_wait_parameters_must_be_positive(self): + with self.assertRaisesRegex(ValueError, "颜色轮询间隔必须大于 0 秒"): + PddCollectService( + PddDeviceService(lambda _serial: object()), + "USB-001", + "client-001", + color_poll_interval=0, + ) + def test_all_missing_color_prices_still_collects_sizes(self): device = AllMissingColorPriceDevice(self.home_xml) service = PddCollectService(