diff options
| author | Simon Charette <charette.s@gmail.com> | 2024-10-31 09:05:58 -0400 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2024-11-01 08:15:10 +0100 |
| commit | 03c0a3de722c4a7de9f3edfeb26417ebc8b90fe9 (patch) | |
| tree | 353e1996a5e9a55b2cb2c7620f410ee95debe881 | |
| parent | 8864125d1f423ee94c2bb1cc36ea998619d47c3f (diff) | |
Refs #373 -- Used a feature flag to disable composite subquery test on MySQL.
| -rw-r--r-- | tests/foreign_object/test_tuple_lookups.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/foreign_object/test_tuple_lookups.py b/tests/foreign_object/test_tuple_lookups.py index 06182d3bb5..499329e7ca 100644 --- a/tests/foreign_object/test_tuple_lookups.py +++ b/tests/foreign_object/test_tuple_lookups.py @@ -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( |
