MCPcopy Create free account
hub / github.com/EasyIME/PIME / test_coroutine

Method test_coroutine

python/python3/tornado/test/websocket_test.py:479–487  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

477
478 @gen_test
479 def test_coroutine(self):
480 ws = yield self.ws_connect("/coroutine")
481 # Send both messages immediately, coroutine must process one at a time.
482 yield ws.write_message("hello1")
483 yield ws.write_message("hello2")
484 res = yield ws.read_message()
485 self.assertEqual(res, "hello1")
486 res = yield ws.read_message()
487 self.assertEqual(res, "hello2")
488
489 @gen_test
490 def test_check_origin_valid_no_path(self):

Callers

nothing calls this directly

Calls 3

ws_connectMethod · 0.80
read_messageMethod · 0.80
write_messageMethod · 0.45

Tested by

no test coverage detected