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

Method test_issubclass

Lib/test/test_genericalias.py:415–419  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

413 isinstance([], list[str])
414
415 def test_issubclass(self):
416 class L(list): ...
417 self.assertIsSubclass(L, list)
418 with self.assertRaises(TypeError):
419 issubclass(L, list[str])
420
421 def test_type_generic(self):
422 t = type[int]

Callers

nothing calls this directly

Calls 2

assertRaisesMethod · 0.95
assertIsSubclassMethod · 0.80

Tested by

no test coverage detected