MCPcopy
hub / github.com/tornadoweb/tornado / test_connection_close

Method test_connection_close

tornado/test/web_test.py:556–564  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

554 return [("/", ConnectionCloseHandler, dict(test=self))]
555
556 def test_connection_close(self):
557 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
558 s.connect(("127.0.0.1", self.get_http_port()))
559 self.stream = IOStream(s)
560 self.stream.write(b"GET / HTTP/1.0\r\n\r\n")
561 self.wait()
562 # Let the hanging coroutine clean up after itself
563 self.cleanup_event.set()
564 self.io_loop.run_sync(lambda: gen.sleep(0))
565
566 def on_handler_waiting(self):
567 logging.debug("handler waiting")

Callers

nothing calls this directly

Calls 7

IOStreamClass · 0.90
run_syncMethod · 0.80
connectMethod · 0.45
get_http_portMethod · 0.45
writeMethod · 0.45
waitMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected