summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_smtplib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_smtplib.py')
-rw-r--r--Lib/test/test_smtplib.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_smtplib.py b/Lib/test/test_smtplib.py
index e798645..a4074c0 100644
--- a/Lib/test/test_smtplib.py
+++ b/Lib/test/test_smtplib.py
@@ -21,13 +21,13 @@ from test import support, mock_socket
from test.support import hashlib_helper
from test.support import socket_helper
from test.support import threading_helper
+from test.support import warnings_helper
from unittest.mock import Mock
-import warnings
-with warnings.catch_warnings():
- warnings.simplefilter('ignore', DeprecationWarning)
- import asyncore
- import smtpd
+
+asyncore = warnings_helper.import_deprecated('asyncore')
+smtpd = warnings_helper.import_deprecated('smtpd')
+
support.requires_working_socket(module=True)