Searched refs:asyncio (Results 1 - 21 of 21) sorted by relevance

/external/python/cpython3/Lib/test/test_asyncio/
H A Dtest_pep492.py10 from asyncio import test_support as support
13 import asyncio namespace
14 from asyncio import test_utils
21 self.loop = asyncio.BaseEventLoop()
32 asyncio.Lock(loop=self.loop),
33 asyncio.Condition(loop=self.loop),
34 asyncio.Semaphore(loop=self.loop),
35 asyncio.BoundedSemaphore(loop=self.loop),
39 await asyncio.sleep(0.01, loop=self.loop)
44 await asyncio
[all...]
H A Dtest_locks.py7 import asyncio namespace
8 from asyncio import test_utils
27 lock = asyncio.Lock(loop=loop)
30 lock = asyncio.Lock(loop=self.loop)
34 asyncio.set_event_loop(self.loop)
35 lock = asyncio.Lock()
39 lock = asyncio.Lock(loop=self.loop)
43 @asyncio.coroutine
52 lock = asyncio.Lock(loop=self.loop)
54 @asyncio
[all...]
H A Dtest_queues.py6 import asyncio namespace
7 from asyncio import test_utils
34 q = asyncio.Queue(loop=loop)
39 @asyncio.coroutine
41 q = asyncio.Queue(loop=loop)
43 asyncio.Task(q.get(), loop=loop)
45 yield from asyncio.sleep(0.1, loop=loop)
52 @asyncio.coroutine
54 q = asyncio.Queue(maxsize=1, loop=loop)
57 asyncio
[all...]
H A Dtest_sslproto.py1 """Tests for asyncio/sslproto.py."""
11 import asyncio namespace
12 from asyncio import log
13 from asyncio import sslproto
14 from asyncio import test_utils
22 self.loop = asyncio.new_event_loop()
27 app_proto = asyncio.Protocol()
43 with mock.patch('asyncio.sslproto._SSLPipe', return_value=sslpipe):
49 waiter = asyncio.Future(loop=self.loop)
51 handshake_fut = asyncio
[all...]
H A Dtest_subprocess.py7 import asyncio namespace
8 from asyncio import base_subprocess
9 from asyncio import subprocess
10 from asyncio import test_utils
14 from asyncio import test_support as support
16 from asyncio import unix_events
53 waiter = asyncio.Future(loop=self.loop)
84 @asyncio.coroutine
86 proc = yield from asyncio.create_subprocess_exec(
103 task = asyncio
[all...]
H A Dtest_tasks.py16 import asyncio namespace
17 from asyncio import coroutines
18 from asyncio import futures
19 from asyncio import tasks
20 from asyncio import test_utils
24 from asyncio import test_support as support
31 from asyncio.test_support import assert_python_ok
38 @asyncio.coroutine
45 coroutines = asyncio.coroutines
96 other_loop = asyncio
[all...]
H A Dtest_streams.py16 import asyncio namespace
17 from asyncio import test_utils
26 self.loop = asyncio.new_event_loop()
37 @mock.patch('asyncio.streams.events')
39 stream = asyncio.StreamReader()
55 conn_fut = asyncio.open_connection(*httpd.address,
62 conn_fut = asyncio.open_unix_connection(httpd.address,
70 asyncio.set_event_loop(None)
81 conn_fut = asyncio.open_connection(
92 conn_fut = asyncio
[all...]
H A Dtest_transports.py6 import asyncio namespace
7 from asyncio import transports
13 transport = asyncio.Transport()
17 transport = asyncio.Transport({'extra': 'info'})
25 transport = asyncio.Transport()
35 transport = asyncio.Transport()
49 transport = asyncio.DatagramTransport()
55 transport = asyncio.SubprocessTransport()
H A Dtest_windows_events.py11 import asyncio namespace
12 from asyncio import _overlapped
13 from asyncio import test_utils
14 from asyncio import windows_events
17 class UpperProto(asyncio.Protocol):
35 self.loop = asyncio.ProactorEventLoop()
40 trans = self.loop._make_socket_transport(a, asyncio.Protocol())
41 f = asyncio.ensure_future(self.loop.sock_recv(b, 100))
63 asyncio.Protocol, ADDRESS)
71 stream_reader = asyncio
[all...]
H A Dtest_base_events.py14 import asyncio namespace
15 from asyncio import base_events
16 from asyncio import constants
17 from asyncio import test_utils
21 from asyncio import test_support as support
28 from asyncio.test_support import assert_python_ok
54 return mock.patch('asyncio.base_events.socket',
205 f = asyncio.Future(loop=self.loop)
210 h = asyncio.Handle(lambda: False, (), self.loop)
217 h = asyncio
[all...]
H A Dtest_events.py29 import asyncio namespace
30 from asyncio import coroutines
31 from asyncio import proactor_events
32 from asyncio import selector_events
33 from asyncio import sslproto
34 from asyncio import test_utils
38 from asyncio import test_support as support
65 loop = asyncio.new_event_loop()
66 asyncio.set_event_loop(loop)
87 class MyBaseProto(asyncio
[all...]
H A Dtest_futures.py10 import asyncio namespace
11 from asyncio import test_utils
12 from asyncio import futures
16 from asyncio import test_support as support
89 g = asyncio.wrap_future(f)
94 g = asyncio.ensure_future(f)
115 self.assertFalse(asyncio.isfuture(MyFuture))
116 self.assertTrue(asyncio.isfuture(MyFuture()))
117 self.assertFalse(asyncio.isfuture(1))
120 self.assertFalse(asyncio
[all...]
H A Dtest_proactor_events.py7 import asyncio namespace
8 from asyncio.proactor_events import BaseProactorEventLoop
9 from asyncio.proactor_events import _ProactorSocketTransport
10 from asyncio.proactor_events import _ProactorWritePipeTransport
11 from asyncio.proactor_events import _ProactorDuplexPipeTransport
12 from asyncio import test_utils
32 self.protocol = test_utils.make_test_protocol(asyncio.Protocol)
42 fut = asyncio.Future(loop=self.loop)
57 res = asyncio.Future(loop=self.loop)
67 res = asyncio
[all...]
H A Dtest_selector_events.py12 import asyncio namespace
13 from asyncio import selectors
14 from asyncio import test_utils
15 from asyncio.selector_events import BaseSelectorEventLoop
16 from asyncio.selector_events import _SelectorTransport
17 from asyncio.selector_events import _SelectorSslTransport
18 from asyncio.selector_events import _SelectorSocketTransport
19 from asyncio.selector_events import _SelectorDatagramTransport
64 transport = self.loop._make_socket_transport(m, asyncio.Protocol())
81 waiter = asyncio
[all...]
H A Dtest_windows_utils.py14 from asyncio import _overlapped
15 from asyncio import windows_utils
19 from asyncio import test_support as support
41 @mock.patch('asyncio.windows_utils.socket')
61 @mock.patch('asyncio.windows_utils.socket')
H A Dtest_unix_events.py22 import asyncio namespace
23 from asyncio import log
24 from asyncio import test_utils
25 from asyncio import unix_events
45 self.loop = asyncio.SelectorEventLoop()
58 h = asyncio.Handle(mock.Mock(), (),
66 @mock.patch('asyncio.unix_events.signal')
76 @mock.patch('asyncio.unix_events.signal')
80 @asyncio.coroutine
94 @mock.patch('asyncio
[all...]
/external/python/cpython3/Lib/test/
H A Dtest_asyncgen.py9 asyncio = import_module("asyncio") variable
328 self.loop = asyncio.new_event_loop()
329 asyncio.set_event_loop(None)
344 await asyncio.sleep(0.01, loop=self.loop)
346 await asyncio.sleep(0.01, loop=self.loop)
356 await asyncio.sleep(0.01, loop=self.loop)
370 await asyncio.sleep(0.01, loop=loop)
379 await asyncio.sleep(0.01, loop=self.loop)
385 await asyncio
[all...]
H A Dtest_coroutines.py1987 # asyncio cannot be imported when Python is compiled without thread
1989 asyncio = support.import_module('asyncio')
1999 await asyncio.sleep(0.01)
2004 await asyncio.sleep(0.01)
2009 await asyncio.sleep(0.01)
2013 loop = asyncio.new_event_loop()
2014 asyncio.set_event_loop(loop)
2021 asyncio.set_event_loop(None)
H A Dtest_typing.py1497 import asyncio
1518 @asyncio.coroutine
1534 asyncio = None variable in class:OverloadTests
/external/python/cpython3/Lib/asyncio/
H A Dtransports.py3 from asyncio import compat
H A Devents.py22 from asyncio import compat
667 """Return an asyncio event loop.

Completed in 1548 milliseconds