MCPcopy Index your code
hub / github.com/RustPython/RustPython / testIsSubclassBuiltin

Method testIsSubclassBuiltin

Lib/test/test_typechecks.py:33–37  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

31 self.assertEqual(Integer.__subclasscheck__(float), False)
32
33 def testIsSubclassBuiltin(self):
34 self.assertEqual(issubclass(int, Integer), True)
35 self.assertEqual(issubclass(int, (Integer,)), True)
36 self.assertEqual(issubclass(float, Integer), False)
37 self.assertEqual(issubclass(float, (Integer,)), False)
38
39 def testIsInstanceBuiltin(self):
40 self.assertEqual(isinstance(42, Integer), True)

Callers

nothing calls this directly

Calls 2

issubclassFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected