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

Method test_Buffer

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

Source from the content-addressed store, hash-verified

1974 collections_abc.ByteString
1975
1976 def test_Buffer(self):
1977 for sample in [bytes, bytearray, memoryview]:
1978 self.assertIsInstance(sample(b"x"), Buffer)
1979 self.assertIsSubclass(sample, Buffer)
1980 for sample in [str, list, tuple]:
1981 self.assertNotIsInstance(sample(), Buffer)
1982 self.assertNotIsSubclass(sample, Buffer)
1983 self.validate_abstract_methods(Buffer, '__buffer__')
1984
1985 def test_MutableSequence(self):
1986 for sample in [tuple, str, bytes]:

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected