]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-96280: suppress deprecation warning in test_importlib (GH-96281)
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>
Fri, 26 Aug 2022 21:44:33 +0000 (22:44 +0100)
committerGitHub <noreply@github.com>
Fri, 26 Aug 2022 21:44:33 +0000 (22:44 +0100)
Lib/test/test_importlib/test_abc.py

index 88bf100efaad80ae4470d4968a041878018edd5c..430dd77f8769090b433b9d88600e8cca660f94d9 100644 (file)
@@ -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):