MCPcopy Create free account
hub / github.com/pybind/pybind11 / SequenceLike

Class SequenceLike

tests/test_sequences_and_iterators.py:190–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188 pass
189
190 class SequenceLike:
191 def __getitem__(self, i):
192 return None
193
194 def __len__(self):
195 raise BadLen()
196
197 with pytest.raises(BadLen):
198 m.sequence_length(SequenceLike())

Callers 1

test_sequence_lengthFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_sequence_lengthFunction · 0.68