]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove now unused function from itertools tests (#122100)
authorBradley Reynolds <bradley.reynolds@darbia.dev>
Mon, 22 Jul 2024 15:03:20 +0000 (10:03 -0500)
committerGitHub <noreply@github.com>
Mon, 22 Jul 2024 15:03:20 +0000 (10:03 -0500)
Lib/test/test_itertools.py

index 052dcace4efdc75534580d6519dfb9234dcfb45f..9c0c4b4de18cf10454fb60b0415bb977c3cf4489 100644 (file)
@@ -15,26 +15,6 @@ import sys
 import struct
 import threading
 import gc
-import warnings
-
-def pickle_deprecated(testfunc):
-    """ Run the test three times.
-    First, verify that a Deprecation Warning is raised.
-    Second, run normally but with DeprecationWarnings temporarily disabled.
-    Third, run with warnings promoted to errors.
-    """
-    def inner(self):
-        with self.assertWarns(DeprecationWarning):
-            testfunc(self)
-        with warnings.catch_warnings():
-            warnings.simplefilter("ignore", category=DeprecationWarning)
-            testfunc(self)
-        with warnings.catch_warnings():
-            warnings.simplefilter("error", category=DeprecationWarning)
-            with self.assertRaises((DeprecationWarning, AssertionError, SystemError)):
-                testfunc(self)
-
-    return inner
 
 maxsize = support.MAX_Py_ssize_t
 minsize = -maxsize-1