summaryrefslogtreecommitdiff
path: root/Lib/test/test_asynchat.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asynchat.py')
-rw-r--r--Lib/test/test_asynchat.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/test/test_asynchat.py b/Lib/test/test_asynchat.py
index d28d67732e..9d08bd0296 100644
--- a/Lib/test/test_asynchat.py
+++ b/Lib/test/test_asynchat.py
@@ -3,6 +3,7 @@
from test import support
from test.support import socket_helper
from test.support import threading_helper
+from test.support import warnings_helper
import errno
import socket
@@ -12,11 +13,9 @@ import time
import unittest
import unittest.mock
-import warnings
-with warnings.catch_warnings():
- warnings.simplefilter('ignore', DeprecationWarning)
- import asynchat
- import asyncore
+
+asynchat = warnings_helper.import_deprecated('asynchat')
+asyncore = warnings_helper.import_deprecated('asyncore')
support.requires_working_socket(module=True)