aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/pickletester.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r--Lib/test/pickletester.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
index 3e2c781caa1..f13d42f6648 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -2383,7 +2383,8 @@ class AbstractPickleTests:
# Issue #3514: crash when there is an infinite loop in __getattr__
x = BadGetattr()
for proto in protocols:
- self.assertRaises(RuntimeError, self.dumps, x, proto)
+ with support.infinite_recursion():
+ self.assertRaises(RuntimeError, self.dumps, x, proto)
def test_reduce_bad_iterator(self):
# Issue4176: crash when 4th and 5th items of __reduce__()