]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Re-suppress asyncio deprecation warnings in AsyncTestCase
authorThomas Kluyver <thomas@kluyver.me.uk>
Fri, 10 Feb 2023 17:12:14 +0000 (17:12 +0000)
committerThomas Kluyver <thomas@kluyver.me.uk>
Fri, 10 Feb 2023 17:12:14 +0000 (17:12 +0000)
tornado/testing.py

index 508b1273f6b23dce3c3970fcf4ec054e87596f7f..cadb28becaceef15cebd054fbc812105b9d3846c 100644 (file)
@@ -182,6 +182,13 @@ class AsyncTestCase(unittest.TestCase):
         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()