summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_generators.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_generators.py')
-rw-r--r--Lib/test/test_generators.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
index 31680b5..1ee9958 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
@@ -2176,6 +2176,7 @@ caught ValueError ()
caught ValueError (xyz)
>>> import warnings
+>>> old_filters = warnings.filters.copy()
>>> warnings.filterwarnings("ignore", category=DeprecationWarning)
# Filter DeprecationWarning: regarding the (type, val, tb) signature of throw().
@@ -2249,8 +2250,7 @@ Traceback (most recent call last):
...
ValueError: 7
->>> warnings.filters.pop(0)
-('ignore', None, <class 'DeprecationWarning'>, None, 0)
+>>> warnings.filters[:] = old_filters
# Re-enable DeprecationWarning: the (type, val, tb) exception representation is deprecated,
# and may be removed in a future version of Python.