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

Method assertIsSubclass

Lib/test/support/testcase.py:7–11  ·  view source on GitHub ↗
(self, cls, superclass, msg=None)

Source from the content-addressed store, hash-verified

5class ExtraAssertions:
6
7 def assertIsSubclass(self, cls, superclass, msg=None):
8 if issubclass(cls, superclass):
9 return
10 standardMsg = f'{cls!r} is not a subclass of {superclass!r}'
11 self.fail(self._formatMessage(msg, standardMsg))
12
13 def assertNotIsSubclass(self, cls, superclass, msg=None):
14 if not issubclass(cls, superclass):

Callers 15

test_exceptionsMethod · 0.45
test_name_mappingMethod · 0.45
test_python_dictsMethod · 0.45
test_issubclassMethod · 0.45
testExceptionTreeMethod · 0.45
test_subclasshookMethod · 0.45

Calls 3

issubclassFunction · 0.85
_formatMessageMethod · 0.80
failMethod · 0.45

Tested by

no test coverage detected