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)
def test_rx_done_empty_queue(self): rx = Rx(self.rx_tree) rx.push(1, [(-199, 32), "DUMMY"]) try: self.io.run_sync(rx.get) except Exception: pass self.io.run_sync(rx.get)
def test_rx_on_done(self): io = IOLoop.current() rx = Rx(self.rx_tree) rx.done() io.run_sync(rx.get)
def test_rx_unexpected_msg_type(self): io = IOLoop.current() rx = Rx(self.rx_tree) rx.push(4, []) io.run_sync(rx.get)
def test_rx_done(self): rx = Rx(self.rx_tree) rx.push(2, []) self.io.run_sync(lambda: rx.get(timeout=1)) self.io.run_sync(rx.get)
def test_rx_error_branch(self): rx = Rx(self.rx_tree) rx.push(1, [(-199, 42), "dummy_error"]) self.io.run_sync(rx.get)
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)
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)
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)
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)
def test_print(self): log.info(Rx(self.rx_tree, self.session_id))