From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Fri, 26 Aug 2022 21:44:33 +0000 (+0100) Subject: gh-96280: suppress deprecation warning in test_importlib (GH-96281) X-Git-Tag: v3.12.0a1~552 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ccf94a6289c722f56000ffed5dd416371127c759;p=thirdparty%2FPython%2Fcpython.git gh-96280: suppress deprecation warning in test_importlib (GH-96281) --- diff --git a/Lib/test/test_importlib/test_abc.py b/Lib/test/test_importlib/test_abc.py index 88bf100efaad..430dd77f8769 100644 --- a/Lib/test/test_importlib/test_abc.py +++ b/Lib/test/test_importlib/test_abc.py @@ -322,7 +322,9 @@ class ResourceReader: class ResourceReaderDefaultsTests(ABCTestHarness): - SPLIT = make_abc_subclasses(ResourceReader) + with warnings.catch_warnings(): + warnings.simplefilter('ignore', DeprecationWarning) + SPLIT = make_abc_subclasses(ResourceReader) def test_open_resource(self): with self.assertRaises(FileNotFoundError):