summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asynchat.py
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2021-06-24 23:20:40 (GMT)
committerGitHub <noreply@github.com>2021-06-24 23:20:40 (GMT)
commit22e7effad571f8e524d2f71ff55bbf2a25306753 (patch)
treece51b9a9501bc006e8f11086924b61ddb31a6af4 /Lib/test/test_asynchat.py
parent8488b85c6397fe58f17fc00e047044c959ac0b04 (diff)
downloadcpython-22e7effad571f8e524d2f71ff55bbf2a25306753.zip
cpython-22e7effad571f8e524d2f71ff55bbf2a25306753.tar.gz
cpython-22e7effad571f8e524d2f71ff55bbf2a25306753.tar.bz2
bpo-44498: suppress DeprecationWarnings for asynchat, asyncore and smtpd in tests (GH-26905)
Diffstat (limited to 'Lib/test/test_asynchat.py')
-rw-r--r--Lib/test/test_asynchat.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_asynchat.py b/Lib/test/test_asynchat.py
index b32eddd..973ac1f 100644
--- a/Lib/test/test_asynchat.py
+++ b/Lib/test/test_asynchat.py
@@ -4,8 +4,6 @@ from test import support
from test.support import socket_helper
from test.support import threading_helper
-import asynchat
-import asyncore
import errno
import socket
import sys
@@ -14,6 +12,12 @@ import time
import unittest
import unittest.mock
+import warnings
+with warnings.catch_warnings():
+ warnings.simplefilter('ignore', DeprecationWarning)
+ import asynchat
+ import asyncore
+
HOST = socket_helper.HOST
SERVER_QUIT = b'QUIT\n'