MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_Sequence

Method test_Sequence

testing/test_assertion.py:669–692  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

667 assert len(expl) > 1
668
669 def test_Sequence(self) -> None:
670 # Test comparing with a Sequence subclass.
671 class TestSequence(MutableSequence[int]):
672 def __init__(self, iterable):
673 self.elements = list(iterable)
674
675 def __getitem__(self, item):
676 return self.elements[item]
677
678 def __len__(self):
679 return len(self.elements)
680
681 def __setitem__(self, item, value):
682 pass
683
684 def __delitem__(self, item):
685 pass
686
687 def insert(self, item, index):
688 pass
689
690 expl = callequal(TestSequence([0, 1]), list([0, 2]))
691 assert expl is not None
692 assert len(expl) > 1
693
694 def test_list_tuples(self) -> None:
695 expl = callequal([], [(1, 2)])

Callers

nothing calls this directly

Calls 2

callequalFunction · 0.85
TestSequenceClass · 0.85

Tested by

no test coverage detected