diff --git a/django/db/backends/base/features.py b/django/db/backends/base/features.py index def23ed1870..8654293146f 100644 --- a/django/db/backends/base/features.py +++ b/django/db/backends/base/features.py @@ -112,9 +112,6 @@ class BaseDatabaseFeatures: # deferred can_defer_constraint_checks = False - # date_interval_sql can properly handle mixed Date/DateTime fields and timedeltas - supports_mixed_date_datetime_comparisons = True - # Does the backend support tablespaces? Default to False because it isn't # in the SQL standard. supports_tablespaces = False diff --git a/django/db/backends/sqlite3/features.py b/django/db/backends/sqlite3/features.py index ea65f72b338..2743ec547ad 100644 --- a/django/db/backends/sqlite3/features.py +++ b/django/db/backends/sqlite3/features.py @@ -18,7 +18,6 @@ class DatabaseFeatures(BaseDatabaseFeatures): supports_unspecified_pk = True supports_timezones = False max_query_params = 999 - supports_mixed_date_datetime_comparisons = False supports_transactions = True atomic_transactions = False can_rollback_ddl = True @@ -50,6 +49,11 @@ class DatabaseFeatures(BaseDatabaseFeatures): 'cs': 'binary', 'non_default': 'nocase', } + django_test_expected_failures = { + # The django_format_dtdelta() function doesn't properly handle mixed + # Date/DateTime fields and timedeltas. + 'expressions.tests.FTimeDeltaTests.test_mixed_comparisons1', + } @cached_property def django_test_skips(self): diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py index 53448ed1d98..4bb65c90315 100644 --- a/tests/expressions/tests.py +++ b/tests/expressions/tests.py @@ -1473,7 +1473,6 @@ class FTimeDeltaTests(TestCase): test_set = [e.name for e in Experiment.objects.filter(completed__lte=F('assigned') + days)] self.assertEqual(test_set, self.expnames[:i + 1]) - @skipUnlessDBFeature("supports_mixed_date_datetime_comparisons") def test_mixed_comparisons1(self): for i, delay in enumerate(self.delays): test_set = [e.name for e in Experiment.objects.filter(assigned__gt=F('start') - delay)]