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

Method test_async_for_presentation

Lib/test/test_dis.py:1302–1316  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1300 self.assertIsNone(e.__context__)
1301
1302 def test_async_for_presentation(self):
1303
1304 async def afunc():
1305 async for letter in async_iter1:
1306 l2
1307 l3
1308
1309 disassembly = self.get_disassembly(afunc)
1310 for line in disassembly.split("\n"):
1311 if "END_ASYNC_FOR" in line:
1312 break
1313 else:
1314 self.fail("No END_ASYNC_FOR in disassembly of async for")
1315 self.assertNotIn("to", line)
1316 self.assertIn("from", line)
1317
1318
1319 @staticmethod

Callers

nothing calls this directly

Calls 5

get_disassemblyMethod · 0.95
assertNotInMethod · 0.80
assertInMethod · 0.80
splitMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected