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

Method test_exception_value_crash

Lib/test/test_yield_from.py:365–373  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

363
364
365 def test_exception_value_crash(self):
366 # There used to be a refcount error when the return value
367 # stored in the StopIteration has a refcount of 1.
368 def g1():
369 yield from g2()
370 def g2():
371 yield "g2"
372 return [42]
373 self.assertEqual(list(g1()), ["g2"])
374
375
376 def test_generator_return_value(self):

Callers

nothing calls this directly

Calls 3

listClass · 0.85
g1Function · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected