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

Class GeneratorCapClient

tornado/test/concurrent_test.py:111–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109
110
111class GeneratorCapClient(BaseCapClient):
112 @gen.coroutine
113 def capitalize(self, request_data):
114 logging.debug("capitalize")
115 stream = IOStream(socket.socket())
116 logging.debug("connecting")
117 yield stream.connect(("127.0.0.1", self.port))
118 stream.write(utf8(request_data + "\n"))
119 logging.debug("reading")
120 data = yield stream.read_until(b"\n")
121 logging.debug("returning")
122 stream.close()
123 raise gen.Return(self.process_response(data))
124
125
126class GeneratorCapClientTest(AsyncTestCase):

Callers 1

setUpMethod · 0.85

Calls

no outgoing calls

Tested by 1

setUpMethod · 0.68