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

Class TestFailingIter

Lib/test/test_functools.py:1079–1081  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1077 self.assertRaises(TypeError, self.reduce, add, object())
1078
1079 class TestFailingIter:
1080 def __iter__(self):
1081 raise RuntimeError
1082 self.assertRaises(RuntimeError, self.reduce, add, TestFailingIter())
1083
1084 self.assertEqual(self.reduce(add, [], None), None)

Callers 1

test_reduceMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_reduceMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…