summaryrefslogtreecommitdiff
path: root/Lib/test/test_asyncore.py
diff options
context:
space:
mode:
authorHugo van Kemenade <hugovk@users.noreply.github.com>2022-05-03 10:17:54 +0300
committerGitHub <noreply@github.com>2022-05-03 10:17:54 +0300
commit9b027d4cea57e98c76f5176cc3188dc81603356c (patch)
tree1306b7c7cc75ce99c311ec8f8085e2e9b145de82 /Lib/test/test_asyncore.py
parentc1767fce521f5d4f175082d0747cfa48542aea3a (diff)
downloadcpython-git-9b027d4cea57e98c76f5176cc3188dc81603356c.tar.gz
gh-92169: Use warnings_helper.import_deprecated() to import deprecated modules uniformly in tests (GH-92170)
Diffstat (limited to 'Lib/test/test_asyncore.py')
-rw-r--r--Lib/test/test_asyncore.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py
index e3f31bd06d..98ccd3a930 100644
--- a/Lib/test/test_asyncore.py
+++ b/Lib/test/test_asyncore.py
@@ -20,10 +20,7 @@ if support.PGO:
support.requires_working_socket(module=True)
-import warnings
-with warnings.catch_warnings():
- warnings.simplefilter('ignore', DeprecationWarning)
- import asyncore
+asyncore = warnings_helper.import_deprecated('asyncore')
HAS_UNIX_SOCKETS = hasattr(socket, 'AF_UNIX')