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

Method test_MutableSequence

Lib/test/test_collections.py:1985–1995  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1983 self.validate_abstract_methods(Buffer, '__buffer__')
1984
1985 def test_MutableSequence(self):
1986 for sample in [tuple, str, bytes]:
1987 self.assertNotIsInstance(sample(), MutableSequence)
1988 self.assertNotIsSubclass(sample, MutableSequence)
1989 for sample in [list, bytearray, deque]:
1990 self.assertIsInstance(sample(), MutableSequence)
1991 self.assertIsSubclass(sample, MutableSequence)
1992 self.assertIsSubclass(array.array, MutableSequence)
1993 self.assertNotIsSubclass(str, MutableSequence)
1994 self.validate_abstract_methods(MutableSequence, '__len__', '__getitem__',
1995 '__setitem__', '__delitem__', 'insert')
1996
1997 def test_MutableSequence_mixins(self):
1998 # Test the mixins of MutableSequence by creating a minimal concrete

Callers

nothing calls this directly

Calls 6

sampleFunction · 0.85
assertNotIsInstanceMethod · 0.80
assertNotIsSubclassMethod · 0.80
assertIsInstanceMethod · 0.80
assertIsSubclassMethod · 0.80

Tested by

no test coverage detected