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

Method run

Lib/test/test_yield_from.py:206–216  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

204 trace.append("g2 received %s" % (x,))
205 trace.append("Finishing g2")
206 def run():
207 g = g1()
208 y = next(g)
209 x = 1
210 try:
211 while 1:
212 y = g.send(x)
213 trace.append("Yielded %s" % (y,))
214 x += 1
215 except StopIteration:
216 trace.append("StopIteration")
217 self.assertRaises(ValueError,run)
218 self.assertEqual(trace,[
219 "Starting g1",

Callers

nothing calls this directly

Calls 3

g1Function · 0.85
sendMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected