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

Method setUp

python/python3/tornado/test/iostream_test.py:948–966  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

946
947class TestIOStreamStartTLS(AsyncTestCase):
948 def setUp(self):
949 try:
950 super().setUp()
951 self.listener, self.port = bind_unused_port()
952 self.server_stream = None
953 self.server_accepted = Future() # type: Future[None]
954 netutil.add_accept_handler(self.listener, self.accept)
955 self.client_stream = IOStream(
956 socket.socket()
957 ) # type: typing.Optional[IOStream]
958 self.io_loop.add_future(
959 self.client_stream.connect(("127.0.0.1", self.port)), self.stop
960 )
961 self.wait()
962 self.io_loop.add_future(self.server_accepted, self.stop)
963 self.wait()
964 except Exception as e:
965 print(e)
966 raise
967
968 def tearDown(self):
969 if self.server_stream is not None:

Callers

nothing calls this directly

Calls 7

bind_unused_portFunction · 0.90
IOStreamClass · 0.90
add_futureMethod · 0.80
printFunction · 0.50
setUpMethod · 0.45
connectMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected