Esempio n. 1
0
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()
Esempio n. 2
0
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()
Esempio n. 3
0
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()