Example #1
0
 def test_run_in_background(self):
     sc = io.import_from_yaml(open('tests/yaml/simple.yaml'))
     intp = Interpreter(sc)
     task = run_in_background(intp, 0.001)
     intp.send(Event('goto s2'))
     intp.send(Event('goto final'))
     task.join()
     self.assertTrue(intp.final)
Example #2
0
 def test_run_in_background(self):
     with open('tests/yaml/simple.yaml') as f:
         sc = io.import_from_yaml(f)
     interpreter = Interpreter(sc)
     task = run_in_background(interpreter, 0.001)
     interpreter.queue(Event('goto s2'))
     interpreter.queue(Event('goto final'))
     task.join()
     self.assertTrue(interpreter.final)
Example #3
0
 def test_run_in_background(self):
     with open('tests/yaml/simple.yaml') as f:
         sc = io.import_from_yaml(f)
     interpreter = Interpreter(sc)
     task = run_in_background(interpreter, 0.001)
     interpreter.queue(Event('goto s2'))
     interpreter.queue(Event('goto final'))
     task.join()
     self.assertTrue(interpreter.final)