diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-06-24 16:38:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-25 00:38:01 +0100 |
commit | 8bec9fb92f09d02c24611ebd0a90103a1a414a40 (patch) | |
tree | 7fbbc8b020e80966714e9d75885255d1442d5db4 /Lib/test/test_asyncore.py | |
parent | a80a38ee9a7b2e26dba848793cc298d8435fddd5 (diff) | |
download | cpython-git-8bec9fb92f09d02c24611ebd0a90103a1a414a40.tar.gz |
bpo-44498: suppress DeprecationWarnings for asynchat, asyncore and smtpd in tests (GH-26905) (GH-26907)
(cherry picked from commit 22e7effad571f8e524d2f71ff55bbf2a25306753)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Diffstat (limited to 'Lib/test/test_asyncore.py')
-rw-r--r-- | Lib/test/test_asyncore.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py index 3bd904d177..ecd1e120ec 100644 --- a/Lib/test/test_asyncore.py +++ b/Lib/test/test_asyncore.py @@ -1,4 +1,3 @@ -import asyncore import unittest import select import os @@ -19,6 +18,11 @@ from io import BytesIO if support.PGO: raise unittest.SkipTest("test is not helpful for PGO") +import warnings +with warnings.catch_warnings(): + warnings.simplefilter('ignore', DeprecationWarning) + import asyncore + HAS_UNIX_SOCKETS = hasattr(socket, 'AF_UNIX') |