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

Class FailOnClose

Lib/test/test_collections.py:1231–1233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1229 self.assertRaises(StopIteration, mgen.throw, StopIteration())
1230
1231 class FailOnClose(Generator):
1232 def send(self, value): return value
1233 def throw(self, *args): raise ValueError
1234
1235 self.assertRaises(ValueError, FailOnClose().close)
1236

Callers 2

test_GeneratorMethod · 0.85
test_AsyncGeneratorMethod · 0.85

Calls

no outgoing calls

Tested by 2

test_GeneratorMethod · 0.68
test_AsyncGeneratorMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…