Lines Matching refs:loop
32 self.loop = asyncio.new_event_loop()
33 self.set_event_loop(self.loop)
37 test_utils.run_briefly(self.loop)
39 self.loop.close()
45 self.loop.set_exception_handler(lambda loop, ctx: messages.append(ctx))
46 reader, writer = self.loop.run_until_complete(open_connection_fut)
49 data = self.loop.run_until_complete(f)
52 data = self.loop.run_until_complete(f)
70 self.loop.set_exception_handler(lambda loop, ctx: messages.append(ctx))
72 reader, writer = self.loop.run_until_complete(open_connection_fut)
77 data = self.loop.run_until_complete(f)
106 self.loop.set_exception_handler(lambda loop, ctx: messages.append(ctx))
107 reader, writer = self.loop.run_until_complete(open_connection_fut)
111 self.loop.run_until_complete(f)
113 test_utils.run_briefly(self.loop)
128 stream = asyncio.StreamReader(loop=self.loop)
134 stream = asyncio.StreamReader(loop=self.loop)
141 stream = asyncio.StreamReader(loop=self.loop)
144 data = self.loop.run_until_complete(stream.read(0))
150 stream = asyncio.StreamReader(loop=self.loop)
151 read_task = self.loop.create_task(stream.read(30))
155 self.loop.call_soon(cb)
157 data = self.loop.run_until_complete(read_task)
163 stream = asyncio.StreamReader(loop=self.loop)
167 data = self.loop.run_until_complete(stream.read(5))
174 stream = asyncio.StreamReader(loop=self.loop)
175 read_task = self.loop.create_task(stream.read(1024))
179 self.loop.call_soon(cb)
181 data = self.loop.run_until_complete(read_task)
187 stream = asyncio.StreamReader(loop=self.loop)
188 read_task = self.loop.create_task(stream.read(-1))
194 self.loop.call_soon(cb)
196 data = self.loop.run_until_complete(read_task)
202 stream = asyncio.StreamReader(loop=self.loop)
205 data = self.loop.run_until_complete(stream.read(2))
210 ValueError, self.loop.run_until_complete, stream.read(2))
214 asyncio.StreamReader(limit=0, loop=self.loop)
217 asyncio.StreamReader(limit=-1, loop=self.loop)
220 stream = asyncio.StreamReader(limit=3, loop=self.loop)
222 data = self.loop.run_until_complete(stream.read(5))
229 stream = asyncio.StreamReader(loop=self.loop)
231 read_task = self.loop.create_task(stream.readline())
237 self.loop.call_soon(cb)
239 line = self.loop.run_until_complete(read_task)
247 stream = asyncio.StreamReader(limit=3, loop=self.loop)
252 ValueError, self.loop.run_until_complete, stream.readline())
256 stream = asyncio.StreamReader(limit=3, loop=self.loop)
262 ValueError, self.loop.run_until_complete, stream.readline())
271 stream = asyncio.StreamReader(loop=self.loop)
277 self.loop.run_until_complete(stream.readline())
282 self.loop.run_until_complete(stream.readline())
289 stream = asyncio.StreamReader(limit=7, loop=self.loop)
295 self.loop.call_soon(cb)
298 ValueError, self.loop.run_until_complete, stream.readline())
303 stream = asyncio.StreamReader(limit=7, loop=self.loop)
309 self.loop.call_soon(cb)
312 ValueError, self.loop.run_until_complete, stream.readline())
316 stream = asyncio.StreamReader(limit=7, loop=self.loop)
318 line = self.loop.run_until_complete(stream.readline())
324 self.loop.run_until_complete(stream.readline())
329 self.loop.run_until_complete(stream.readline())
335 stream = asyncio.StreamReader(loop=self.loop)
339 line = self.loop.run_until_complete(stream.readline())
345 stream = asyncio.StreamReader(loop=self.loop)
349 line = self.loop.run_until_complete(stream.readline())
353 stream = asyncio.StreamReader(loop=self.loop)
356 line = self.loop.run_until_complete(stream.readline())
360 stream = asyncio.StreamReader(loop=self.loop)
363 self.loop.run_until_complete(stream.readline())
365 data = self.loop.run_until_complete(stream.read(7))
371 stream = asyncio.StreamReader(loop=self.loop)
374 data = self.loop.run_until_complete(stream.readline())
379 ValueError, self.loop.run_until_complete, stream.readline())
383 stream = asyncio.StreamReader(loop=self.loop)
385 self.loop.run_until_complete(stream.readuntil(separator=b''))
388 stream = asyncio.StreamReader(loop=self.loop)
391 data = self.loop.run_until_complete(stream.readuntil(separator=b'AAA'))
396 data = self.loop.run_until_complete(stream.readuntil(b'AAA'))
401 data = self.loop.run_until_complete(stream.readuntil(b'AAA'))
406 stream = asyncio.StreamReader(loop=self.loop)
411 data = self.loop.run_until_complete(stream.readuntil(b'aaa'))
418 data = self.loop.run_until_complete(stream.readuntil(b'aaa'))
423 data = self.loop.run_until_complete(stream.readuntil(b'aaa'))
428 data = self.loop.run_until_complete(stream.readuntil(b'aaa'))
436 data = self.loop.run_until_complete(stream.readuntil(b'aaa'))
441 stream = asyncio.StreamReader(loop=self.loop)
448 self.loop.run_until_complete(stream.readuntil(b'AAA'))
454 stream = asyncio.StreamReader(loop=self.loop, limit=3)
458 self.loop.run_until_complete(stream.readuntil(b'AAA'))
465 self.loop.run_until_complete(stream.readuntil(b'AAA'))
471 stream = asyncio.StreamReader(loop=self.loop)
474 data = self.loop.run_until_complete(stream.readexactly(0))
479 self.loop.run_until_complete(stream.readexactly(-1))
484 stream = asyncio.StreamReader(loop=self.loop)
487 read_task = self.loop.create_task(stream.readexactly(n))
493 self.loop.call_soon(cb)
495 data = self.loop.run_until_complete(read_task)
500 stream = asyncio.StreamReader(limit=3, loop=self.loop)
502 data = self.loop.run_until_complete(stream.readexactly(5))
508 stream = asyncio.StreamReader(loop=self.loop)
510 read_task = self.loop.create_task(stream.readexactly(n))
515 self.loop.call_soon(cb)
518 self.loop.run_until_complete(read_task)
526 stream = asyncio.StreamReader(loop=self.loop)
529 data = self.loop.run_until_complete(stream.readexactly(2))
534 ValueError, self.loop.run_until_complete, stream.readexactly(2))
537 stream = asyncio.StreamReader(loop=self.loop)
545 stream = asyncio.StreamReader(loop=self.loop)
550 t1 = self.loop.create_task(stream.readline())
551 t2 = self.loop.create_task(set_err())
553 self.loop.run_until_complete(asyncio.wait([t1, t2]))
558 stream = asyncio.StreamReader(loop=self.loop)
560 t = self.loop.create_task(stream.readline())
561 test_utils.run_briefly(self.loop)
563 test_utils.run_briefly(self.loop)
566 test_utils.run_briefly(self.loop)
573 def __init__(self, loop): argument
575 self.loop = loop
586 self.server = self.loop.run_until_complete(
592 self.loop.create_task(self.handle_client(client_reader,
599 self.server = self.loop.run_until_complete(
607 self.loop.run_until_complete(self.server.wait_closed())
621 self.loop.set_exception_handler(lambda loop, ctx: messages.append(ctx))
624 server = MyServer(self.loop)
626 msg = self.loop.run_until_complete(self.loop.create_task(client(addr)))
631 server = MyServer(self.loop)
633 msg = self.loop.run_until_complete(self.loop.create_task(client(addr)))
644 def __init__(self, loop, path): argument
646 self.loop = loop
657 self.server = self.loop.run_until_complete(
662 self.loop.create_task(self.handle_client(client_reader,
668 self.server = self.loop.run_until_complete(start)
673 self.loop.run_until_complete(self.server.wait_closed())
687 self.loop.set_exception_handler(lambda loop, ctx: messages.append(ctx))
691 server = MyServer(self.loop, path)
693 msg = self.loop.run_until_complete(
694 self.loop.create_task(client(path)))
700 server = MyServer(self.loop, path)
702 msg = self.loop.run_until_complete(
703 self.loop.create_task(client(path)))
727 reader = asyncio.StreamReader(loop=self.loop, limit=1)
728 protocol = asyncio.StreamReaderProtocol(reader, loop=self.loop)
729 transport, _ = self.loop.run_until_complete(
730 self.loop.connect_read_pipe(lambda: protocol, pipe))
733 watcher.attach_loop(self.loop)
740 proc = self.loop.run_until_complete(create)
741 self.loop.run_until_complete(proc.wait())
746 data = self.loop.run_until_complete(reader.read(-1))
761 reader = self.loop.run_until_complete(test())
762 self.assertIs(reader._loop, self.loop)
769 asyncio.set_event_loop(self.loop)
773 self.assertIs(reader._loop, self.loop)
789 protocol = self.loop.run_until_complete(test())
790 self.assertIs(protocol._loop, self.loop)
797 asyncio.set_event_loop(self.loop)
802 self.assertIs(protocol._loop, self.loop)
813 self.loop.set_exception_handler(lambda loop, ctx: messages.append(ctx))
840 self.loop.run_until_complete(client(*addr))
848 stream = asyncio.StreamReader(loop=self.loop)
852 stream = asyncio.StreamReader(loop=self.loop, limit=123)
856 stream = asyncio.StreamReader(loop=self.loop)
861 stream = asyncio.StreamReader(loop=self.loop)
866 stream = asyncio.StreamReader(loop=self.loop)
873 stream = asyncio.StreamReader(loop=self.loop)
874 stream._waiter = asyncio.Future(loop=self.loop)
879 self.loop.run_until_complete(stream._waiter)
884 stream = asyncio.StreamReader(loop=self.loop)
909 rd, wr = self.loop.run_until_complete(
914 data = self.loop.run_until_complete(f)
917 data = self.loop.run_until_complete(f)
922 self.loop.run_until_complete(wr.wait_closed())
926 rd, wr = self.loop.run_until_complete(
931 data = self.loop.run_until_complete(f)
934 self.loop.run_until_complete(wr.wait_closed())
949 self.loop.set_exception_handler(lambda loop, ctx: messages.append(ctx))
952 self.loop.run_until_complete(inner(httpd))
971 self.loop.set_exception_handler(lambda loop, ctx: messages.append(ctx))
974 self.loop.run_until_complete(inner(httpd))
981 self.loop.set_exception_handler(lambda loop, ctx: messages.append(ctx))
984 rd, wr = self.loop.run_until_complete(
989 self.loop.run_until_complete(f)
992 data = self.loop.run_until_complete(f)