Example #1
0
 def test_rx_done_empty_queue(self):
     rx = Rx(self.rx_tree, self.session_id)
     rx.push(1, [(-199, 32), "DUMMY"], None)
     try:
         self.io.run_sync(rx.get)
     except Exception:
         pass
     self.io.run_sync(rx.get)
Example #2
0
 def test_rx_on_done(self):
     io = IOLoop.current()
     rx = Rx(self.rx_tree, self.session_id)
     rx.done()
     io.run_sync(rx.get, timeout=1)
Example #3
0
 def test_rx_unexpected_msg_type(self):
     io = IOLoop.current()
     rx = Rx(self.rx_tree, self.session_id)
     rx.push(4, [], None)
     io.run_sync(rx.get)
Example #4
0
 def test_rx_done(self):
     rx = Rx(self.rx_tree, self.session_id)
     rx.push(2, [], None)
     self.io.run_sync(lambda: rx.get(timeout=1))
     self.io.run_sync(rx.get)
Example #5
0
 def test_rx_error_branch(self):
     rx = Rx(self.rx_tree, self.session_id)
     rx.push(1, [(-199, 42), "dummy_error"], None)
     self.io.run_sync(rx.get)
Example #6
0
 def test_print(self):
     log.info(Rx(self.rx_tree, self.session_id))