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