MCPcopy Index your code
hub / github.com/RustPython/RustPython / TestFailingIter

Class TestFailingIter

Lib/test/test_functools.py:1015–1017  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1013 self.assertRaises(TypeError, self.reduce, add, object())
1014
1015 class TestFailingIter:
1016 def __iter__(self):
1017 raise RuntimeError
1018 self.assertRaises(RuntimeError, self.reduce, add, TestFailingIter())
1019
1020 self.assertEqual(self.reduce(add, [], None), None)

Callers 1

test_reduceMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_reduceMethod · 0.56