diff options
author | Hugo van Kemenade <hugovk@users.noreply.github.com> | 2022-05-03 07:17:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 07:17:54 (GMT) |
commit | 9b027d4cea57e98c76f5176cc3188dc81603356c (patch) | |
tree | 1306b7c7cc75ce99c311ec8f8085e2e9b145de82 /Lib/test/test_ssl.py | |
parent | c1767fce521f5d4f175082d0747cfa48542aea3a (diff) | |
download | cpython-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_ssl.py')
-rw-r--r-- | Lib/test/test_ssl.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 543d34a..0eb8d18 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -12,7 +12,6 @@ from test.support import warnings_helper import socket import select import time -import datetime import enum import gc import os @@ -30,10 +29,9 @@ try: except ImportError: ctypes = None -import warnings -with warnings.catch_warnings(): - warnings.simplefilter('ignore', DeprecationWarning) - import asyncore + +asyncore = warnings_helper.import_deprecated('asyncore') + ssl = import_helper.import_module("ssl") import _ssl |