test: Update runtime warning for exceeded cycle time in mainloop

This commit is contained in:
2024-11-12 10:38:16 +01:00
parent 19bbdb03e8
commit a9ec71e970

View File

@@ -141,14 +141,15 @@ class TestMainloop(TestRevPiModIO):
rpi.io.test1.unreg_event() rpi.io.test1.unreg_event()
rpi.io.test1.reg_event(xxx_timeout) rpi.io.test1.reg_event(xxx_timeout)
rpi.exit()
sleep(0.3) # Exceed cycle time in mainloop
# Exceed cylcle time in main loop
with self.assertWarnsRegex(RuntimeWarning, r"io refresh time of 0 ms exceeded!"): with self.assertWarnsRegex(RuntimeWarning, r"io refresh time of 0 ms exceeded!"):
rpi = self.modio(debug=False, autorefresh=True)
rpi.mainloop(blocking=False)
rpi._imgwriter._refresh = 0.0001 rpi._imgwriter._refresh = 0.0001
sleep(0.1) sleep(0.1)
rpi.exit() rpi.exit()
del rpi del rpi