1
0
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:
Simon Charette
2019-04-05 00:40:54 -04:00
committed by Mariusz Felisiak
parent c0969ee227
commit 0cb4062482
2 changed files with 2 additions and 2 deletions

View File

@@ -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)