def test_stop(): alert.new(_alert_fn, delay=0.01) a = alert.new(_alert_fn, delay=0.01) assert len(alert.show()) == 2 a.stop() assert len(alert.show()) == 1 alert.new(_alert_fn, delay=0.01) alert.new(_alert_fn, delay=0.01) assert len(alert.show()) == 3 alert.stop_all() assert len(alert.show()) == 0
def setup(): yield alert.stop_all()