mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
gh-92169: Use warnings_helper.import_deprecated() to import deprecated modules uniformly in tests (GH-92170)
This commit is contained in:
parent
c1767fce52
commit
9b027d4cea
10 changed files with 33 additions and 41 deletions
|
|
@ -3,6 +3,7 @@
|
|||
from test import support
|
||||
from test.support import socket_helper
|
||||
from test.support import threading_helper
|
||||
from test.support import warnings_helper
|
||||
|
||||
import errno
|
||||
import socket
|
||||
|
|
@ -12,11 +13,9 @@
|
|||
import unittest
|
||||
import unittest.mock
|
||||
|
||||
import warnings
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter('ignore', DeprecationWarning)
|
||||
import asynchat
|
||||
import asyncore
|
||||
|
||||
asynchat = warnings_helper.import_deprecated('asynchat')
|
||||
asyncore = warnings_helper.import_deprecated('asyncore')
|
||||
|
||||
support.requires_working_socket(module=True)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue