MCPcopy Index your code
hub / github.com/python/cpython / test_iter

Method test_iter

Lib/test/test_asyncio/test_futures.py:507–518  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

505 self.assertEqual(str(cm.exception), "invalid")
506
507 def test_iter(self):
508 fut = self._new_future(loop=self.loop)
509
510 def coro():
511 yield from fut
512
513 def test():
514 arg1, arg2 = coro()
515
516 with self.assertRaisesRegex(RuntimeError, "await wasn't used"):
517 test()
518 fut.cancel()
519
520 def test_log_traceback(self):
521 fut = self._new_future(loop=self.loop)

Callers

nothing calls this directly

Calls 4

_new_futureMethod · 0.95
testFunction · 0.90
assertRaisesRegexMethod · 0.80
cancelMethod · 0.45

Tested by

no test coverage detected