Skip to content

Commit

Permalink
Re-suppress asyncio deprecation warnings in AsyncTestCase
Browse files Browse the repository at this point in the history
  • Loading branch information
takluyver committed Feb 10, 2023
1 parent e4559b3 commit 6772f90
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tornado/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ def __init__(self, methodName: str = "runTest") -> None:
self._test_generator = None # type: Optional[Union[Generator, Coroutine]]

def setUp(self) -> None:
setup_with_context_manager(self, warnings.catch_warnings())
warnings.filterwarnings(
"ignore",
message="There is no current event loop",
category=DeprecationWarning,
module=r"tornado\..*",
)
super().setUp()
self.io_loop = self.get_new_ioloop()
self.io_loop.make_current()
Expand Down

0 comments on commit 6772f90

Please sign in to comment.