summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ftplib.py
diff options
context:
space:
mode:
authorHugo van Kemenade <hugovk@users.noreply.github.com>2022-05-03 07:17:54 (GMT)
committerGitHub <noreply@github.com>2022-05-03 07:17:54 (GMT)
commit9b027d4cea57e98c76f5176cc3188dc81603356c (patch)
tree1306b7c7cc75ce99c311ec8f8085e2e9b145de82 /Lib/test/test_ftplib.py
parentc1767fce521f5d4f175082d0747cfa48542aea3a (diff)
downloadcpython-9b027d4cea57e98c76f5176cc3188dc81603356c.zip
cpython-9b027d4cea57e98c76f5176cc3188dc81603356c.tar.gz
cpython-9b027d4cea57e98c76f5176cc3188dc81603356c.tar.bz2
gh-92169: Use warnings_helper.import_deprecated() to import deprecated modules uniformly in tests (GH-92170)
Diffstat (limited to 'Lib/test/test_ftplib.py')
-rw-r--r--Lib/test/test_ftplib.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py
index 2794fcc..082a90d 100644
--- a/Lib/test/test_ftplib.py
+++ b/Lib/test/test_ftplib.py
@@ -23,11 +23,10 @@ from test.support import socket_helper
from test.support import warnings_helper
from test.support.socket_helper import HOST, HOSTv6
-import warnings
-with warnings.catch_warnings():
- warnings.simplefilter('ignore', DeprecationWarning)
- import asyncore
- import asynchat
+
+asynchat = warnings_helper.import_deprecated('asynchat')
+asyncore = warnings_helper.import_deprecated('asyncore')
+
support.requires_working_socket(module=True)