示例#1
0
 def _test_repeated_coroutine(index, coroutine):
     # index is always 1 ahead
     self.assertEquals(index, 1)
     # advance
     coroutine.next()
     text, end_of_session = coroutine.send((MenuSystem(), {}))
     self.assertEquals(text, "Prompt 1")
     self.assertFalse(end_of_session)
示例#2
0
 def _test_coroutine(coroutine):
     # advance
     coroutine.next()
     text, end_of_session = coroutine.send((MenuSystem(), {}))
     self.assertEquals(text, "Prompt 2")
     self.assertFalse(end_of_session)