(self)
| 195 | __requires__ = ("greenlet",) |
| 196 | |
| 197 | def test_lazy_init(self): |
| 198 | run = [False] |
| 199 | |
| 200 | def thread_go(q): |
| 201 | def go(): |
| 202 | q.get(timeout=0.1) |
| 203 | |
| 204 | with expect_raises(queue.Empty): |
| 205 | asyncio.run(greenlet_spawn(go)) |
| 206 | run[0] = True |
| 207 | |
| 208 | t = threading.Thread( |
| 209 | target=thread_go, args=[queue.AsyncAdaptedQueue()] |
| 210 | ) |
| 211 | t.start() |
| 212 | t.join() |
| 213 | |
| 214 | is_true(run[0]) |
| 215 | |
| 216 | @async_test |
| 217 | async def test_error_other_loop(self): |