summaryrefslogtreecommitdiff
path: root/Lib/test/test_smtpd.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_smtpd.py')
-rw-r--r--Lib/test/test_smtpd.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/test/test_smtpd.py b/Lib/test/test_smtpd.py
index d2e150d535..57eb98ebc1 100644
--- a/Lib/test/test_smtpd.py
+++ b/Lib/test/test_smtpd.py
@@ -6,11 +6,9 @@ from test.support import warnings_helper
import socket
import io
-import warnings
-with warnings.catch_warnings():
- warnings.simplefilter('ignore', DeprecationWarning)
- import smtpd
- import asyncore
+
+smtpd = warnings_helper.import_deprecated('smtpd')
+asyncore = warnings_helper.import_deprecated('asyncore')
class DummyServer(smtpd.SMTPServer):