(self, method)
| 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() |