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

Class BadSeq

Lib/test/test_functools.py:1023–1025  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1021 self.assertEqual(self.reduce(add, [], 42), 42)
1022
1023 class BadSeq:
1024 def __getitem__(self, index):
1025 raise ValueError
1026 self.assertRaises(ValueError, self.reduce, 42, BadSeq())
1027
1028 # Test reduce()'s use of iterators.

Callers 1

test_reduceMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_reduceMethod · 0.56