1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Refs #373 -- Used a feature flag to disable composite subquery test on MySQL.

This commit is contained in:
Simon Charette 2024-10-31 09:05:58 -04:00 committed by Sarah Boyce
parent 8864125d1f
commit 03c0a3de72

View File

@ -1,7 +1,6 @@
import itertools
import unittest
from django.db import NotSupportedError, connection
from django.db import NotSupportedError
from django.db.models import F
from django.db.models.fields.tuple_lookups import (
TupleExact,
@ -12,7 +11,7 @@ from django.db.models.fields.tuple_lookups import (
TupleLessThan,
TupleLessThanOrEqual,
)
from django.test import TestCase
from django.test import TestCase, skipUnlessDBFeature
from .models import Contact, Customer
@ -119,10 +118,7 @@ class TupleLookupsTests(TestCase):
Contact.objects.filter(lookup).order_by("id"), contacts
)
@unittest.skipIf(
connection.vendor == "mysql",
"MySQL doesn't support LIMIT & IN/ALL/ANY/SOME subquery",
)
@skipUnlessDBFeature("allow_sliced_subqueries_with_in")
def test_in_subquery(self):
subquery = Customer.objects.filter(id=self.customer_1.id)[:1]
self.assertSequenceEqual(