mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
Issue #19235: Add new RecursionError exception. Patch by Georg Brandl.
This commit is contained in:
parent
27be130ec7
commit
f488fb422a
31 changed files with 101 additions and 69 deletions
|
@ -327,7 +327,7 @@ class TestCopy(unittest.TestCase):
|
|||
x.append(x)
|
||||
y = copy.deepcopy(x)
|
||||
for op in comparisons:
|
||||
self.assertRaises(RuntimeError, op, y, x)
|
||||
self.assertRaises(RecursionError, op, y, x)
|
||||
self.assertIsNot(y, x)
|
||||
self.assertIs(y[0], y)
|
||||
self.assertEqual(len(y), 1)
|
||||
|
@ -354,7 +354,7 @@ class TestCopy(unittest.TestCase):
|
|||
x[0].append(x)
|
||||
y = copy.deepcopy(x)
|
||||
for op in comparisons:
|
||||
self.assertRaises(RuntimeError, op, y, x)
|
||||
self.assertRaises(RecursionError, op, y, x)
|
||||
self.assertIsNot(y, x)
|
||||
self.assertIsNot(y[0], x[0])
|
||||
self.assertIs(y[0][0], y)
|
||||
|
@ -373,7 +373,7 @@ class TestCopy(unittest.TestCase):
|
|||
for op in order_comparisons:
|
||||
self.assertRaises(TypeError, op, y, x)
|
||||
for op in equality_comparisons:
|
||||
self.assertRaises(RuntimeError, op, y, x)
|
||||
self.assertRaises(RecursionError, op, y, x)
|
||||
self.assertIsNot(y, x)
|
||||
self.assertIs(y['foo'], y)
|
||||
self.assertEqual(len(y), 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue