Lines Matching refs:doubles

22         doubles = MapAsyncIterator(source(), lambda x: x + x)
24 assert await anext(doubles) == 2
25 assert await anext(doubles) == 4
26 assert await anext(doubles) == 6
28 assert await anext(doubles)
44 doubles = MapAsyncIterator(Iterator(), lambda x: x + x)
46 values = [value async for value in doubles]
58 doubles = MapAsyncIterator(source(), lambda x: x + x)
60 values = [value async for value in doubles]
74 doubles = MapAsyncIterator(source(), double)
76 values = [value async for value in doubles]
87 doubles = MapAsyncIterator(source(), lambda x: x + x)
89 assert await anext(doubles) == 2
90 assert await anext(doubles) == 4
93 await doubles.aclose()
97 await anext(doubles)
99 await anext(doubles)
115 doubles = MapAsyncIterator(Iterator(), lambda x: x + x)
117 assert await anext(doubles) == 2
118 assert await anext(doubles) == 4
121 await doubles.aclose()
125 await anext(doubles)
127 await anext(doubles)
140 doubles = MapAsyncIterator(source(), lambda x: x + x)
142 assert await anext(doubles) == 2
143 assert await anext(doubles) == 4
146 await doubles.aclose()
149 assert await anext(doubles) == "LastLast"
151 assert await anext(doubles)
167 doubles = MapAsyncIterator(Iterator(), lambda x: x + x)
169 assert await anext(doubles) == 2
170 assert await anext(doubles) == 4
174 await doubles.athrow(RuntimeError("Ouch"))
179 await anext(doubles)
181 await anext(doubles)
245 doubles = MapAsyncIterator(source(), lambda x: x + x)
247 assert await anext(doubles) == 2
248 assert await anext(doubles) == 4
251 await doubles.athrow(RuntimeError("ouch"))
254 await anext(doubles)
256 await anext(doubles)
264 doubles = MapAsyncIterator(source(), lambda x: x + x)
266 assert await anext(doubles) == "HelloHello"
269 await anext(doubles)
278 doubles = MapAsyncIterator(source(), lambda x: x + x)
280 assert await anext(doubles) == "HelloHello"
283 await doubles.athrow(RuntimeError("Goodbye"))
293 doubles = MapAsyncIterator(source(), lambda x: x + x, lambda error: error)
295 assert await anext(doubles) == "HelloHello"
297 result = await anext(doubles)
302 await anext(doubles)
328 doubles = MapAsyncIterator(iterator(), double)
330 await doubles.aclose()
333 await anext(doubles)
335 doubles = MapAsyncIterator(iterator(), double)
337 assert await anext(doubles) == 2
338 assert await anext(doubles) == 4
339 assert await anext(doubles) == 6
342 await anext(doubles)
344 doubles = MapAsyncIterator(iterator(), double)
346 assert await anext(doubles) == 2
347 assert await anext(doubles) == 4
351 await doubles.athrow(RuntimeError("ouch"))
356 await anext(doubles)
358 await anext(doubles)
360 await doubles.athrow(RuntimeError("no more ouch"))
363 await anext(doubles)
365 await doubles.aclose()
367 doubles = MapAsyncIterator(iterator(), double)
369 assert await anext(doubles) == 2
370 assert await anext(doubles) == 4
379 await doubles.athrow(ValueError, None, tb)
392 doubles = MapAsyncIterator(singles, lambda x: x * 2)
394 result = await anext(doubles)
398 doubles_future = ensure_future(anext(doubles))
403 await doubles.aclose()
434 doubles = MapAsyncIterator(iterator, lambda x: x + x)
436 assert await anext(doubles) == 2
437 assert await anext(doubles) == 4
439 await doubles.aclose()
444 await anext(doubles)
445 assert doubles.is_closed
448 doubles.is_closed = False
449 assert not doubles.is_closed
451 assert await anext(doubles) == 6
452 assert not doubles.is_closed
457 await anext(doubles)
458 assert not doubles.is_closed
483 doubles = MapAsyncIterator(iterator, lambda x: x + x) # pragma: no cover exit
489 async for _ in doubles:
497 assert not doubles.is_closed
504 assert doubles.is_closed