mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #23758 -- Used RecursionError instead of RuntimeError to raise nested subquery errors.
RecursionError was introduced in Python 3.5 and subclasses RuntimeError.
This commit is contained in:
committed by
Mariusz Felisiak
parent
c0969ee227
commit
0cb4062482
@@ -405,7 +405,7 @@ class Queries1Tests(TestCase):
|
||||
x = Tag.objects.filter(pk=1)
|
||||
local_recursion_limit = sys.getrecursionlimit() // 16
|
||||
msg = 'Maximum recursion depth exceeded: too many subqueries.'
|
||||
with self.assertRaisesMessage(RuntimeError, msg):
|
||||
with self.assertRaisesMessage(RecursionError, msg):
|
||||
for i in range(local_recursion_limit + 2):
|
||||
x = Tag.objects.filter(pk__in=x)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user