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

Method _callTestMethod

Lib/unittest/case.py:612–624  ·  view source on GitHub ↗
(self, method)

Source from the content-addressed store, hash-verified

610 self.setUp()
611
612 def _callTestMethod(self, method):
613 result = method()
614 if result is not None:
615 import inspect
616 msg = (
617 f'It is deprecated to return a value that is not None '
618 f'from a test case ({method} returned {type(result).__name__!r})'
619 )
620 if inspect.iscoroutine(result):
621 msg += (
622 '. Maybe you forgot to use IsolatedAsyncioTestCase as the base class?'
623 )
624 warnings.warn(msg, DeprecationWarning, stacklevel=3)
625
626 def _callTearDown(self):
627 self.tearDown()

Callers 2

runMethod · 0.95
debugMethod · 0.95

Calls 2

methodFunction · 0.85
warnMethod · 0.45

Tested by

no test coverage detected