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

Method test___repr__waiter

Lib/test/test_asyncio/test_streams.py:998–1007  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

996 repr(stream))
997
998 def test___repr__waiter(self):
999 stream = asyncio.StreamReader(loop=self.loop)
1000 stream._waiter = asyncio.Future(loop=self.loop)
1001 self.assertRegex(
1002 repr(stream),
1003 r"<StreamReader waiter=<Future pending[\S ]*>>")
1004 stream._waiter.set_result(None)
1005 self.loop.run_until_complete(stream._waiter)
1006 stream._waiter = None
1007 self.assertEqual("<StreamReader>", repr(stream))
1008
1009 def test___repr__transport(self):
1010 stream = asyncio.StreamReader(loop=self.loop)

Callers

nothing calls this directly

Calls 4

assertRegexMethod · 0.80
set_resultMethod · 0.45
run_until_completeMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected