def test_periodic_join_stop_no_start(): t = _periodic.PeriodicService(1) t.join() t.stop() t.join() t = _periodic.PeriodicService(1) t.stop() t.join() t.stop()
def test_periodic_service_start_stop(): t = _periodic.PeriodicService(1) t.start() with pytest.raises(_service.ServiceAlreadyRunning): t.start() t.stop() t.join() t.stop() t.stop() t.join() t.join()
def test_periodic_service_start_stop(): t = _periodic.PeriodicService(1) t.start() with pytest.raises(RuntimeError): t.start() t.stop() t.join() t.stop() t.stop() t.join() t.join()