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

Method test_Sequence

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

Source from the content-addressed store, hash-verified

1890 self.assertEqual(z, {('orange', 3), ('red', 5)})
1891
1892 def test_Sequence(self):
1893 for sample in [tuple, list, bytes, str]:
1894 self.assertIsInstance(sample(), Sequence)
1895 self.assertIsSubclass(sample, Sequence)
1896 self.assertIsInstance(range(10), Sequence)
1897 self.assertIsSubclass(range, Sequence)
1898 self.assertIsInstance(memoryview(b""), Sequence)
1899 self.assertIsSubclass(memoryview, Sequence)
1900 self.assertIsSubclass(str, Sequence)
1901 self.validate_abstract_methods(Sequence, '__len__', '__getitem__')
1902
1903 def test_Sequence_mixins(self):
1904 class SequenceSubclass(Sequence):

Callers

nothing calls this directly

Calls 4

sampleFunction · 0.85
assertIsInstanceMethod · 0.80
assertIsSubclassMethod · 0.80

Tested by

no test coverage detected