def test_load_process(): try: process = load_process('simple_process') except RuntimeError: pass try: process = load_process('examples.simple_process') except RuntimeError: pass assert load_process('tests.processes.simple_process.SimpleProcess').__name__ == 'SimpleProcess' assert load_process('tests.processes.few_simple_process.SimpleProcess1').__name__ == 'SimpleProcess1' assert load_process('tests.processes.few_simple_process.SimpleProcess2').__name__ == 'SimpleProcess2'
def test_service_start(): process = pyservice.load_process( 'tests.processes.simple_process.SimpleProcess') service = pyservice.Service(process) service.start() assert process <> None, process assert service <> None, service
def test_service_stop(): time.sleep(2) process = pyservice.load_process('tests.processes.simple_process.SimpleProcess') service = pyservice.Service(process) service.stop() assert process <> None, process assert service <> None, service
def test_run_process1(self): process1 = pyservice.load_process('tests.processes.few_simple_process.SimpleProcess1') service1 = pyservice.Service(process1) service1.start()
def test_run_process1(self): process2 = pyservice.load_process( 'tests.processes.few_simple_process.SimpleProcess2') service2 = pyservice.Service(process2) service2.start()
def test_run_process1(self): process2 = pyservice.load_process("tests.processes.few_simple_process.SimpleProcess2") service2 = pyservice.Service(process2) service2.start()