Skip to content

Commit 51a65b5

Browse files
committed
add annotations test skips
1 parent 0e8946a commit 51a65b5

File tree

2 files changed

+71
-2
lines changed

2 files changed

+71
-2
lines changed

.github/workflows/test-python.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ jobs:
6767
- name: Run tests
6868
run: >
6969
python3 django_repo/tests/runtests.py --settings mongodb_settings -v 2
70-
annotations.tests.NonAggregateAnnotationTestCase.test_basic_annotation
71-
annotations.tests.NonAggregateAnnotationTestCase.test_basic_f_annotation
70+
annotations
7271
auth_tests.test_models.UserManagerTestCase
7372
backends.base.test_base.DatabaseWrapperTests
7473
basic

django_mongodb/features.py

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class DatabaseFeatures(BaseDatabaseFeatures):
4040
# 'TruncDate' object has no attribute 'as_mql'.
4141
"model_fields.test_datetimefield.DateTimeFieldTests.test_lookup_date_with_use_tz",
4242
"model_fields.test_datetimefield.DateTimeFieldTests.test_lookup_date_without_use_tz",
43+
# BaseDatabaseOperations.date_extract_sql() not implemented.
44+
"annotations.tests.AliasTests.test_basic_alias_f_transform_annotation",
4345
# Slicing with QuerySet.count() doesn't work.
4446
"lookup.tests.LookupTests.test_count",
4547
# Lookup in order_by() not supported:
@@ -74,6 +76,8 @@ class DatabaseFeatures(BaseDatabaseFeatures):
7476
"model_fields.test_uuid.TestQuerying.test_startswith",
7577
},
7678
"QuerySet.update() with expression not supported.": {
79+
"annotations.tests.AliasTests.test_update_with_alias",
80+
"annotations.tests.NonAggregateAnnotationTestCase.test_update_with_annotation",
7781
"model_fields.test_integerfield.PositiveIntegerFieldTests.test_negative_values",
7882
"timezones.tests.NewDatabaseTests.test_update_with_timedelta",
7983
"update.tests.AdvancedTests.test_update_annotated_queryset",
@@ -89,6 +93,8 @@ class DatabaseFeatures(BaseDatabaseFeatures):
8993
"model_fields.test_autofield.SmallAutoFieldTests",
9094
},
9195
"QuerySet.select_related() not supported.": {
96+
"annotations.tests.AliasTests.test_joined_alias_annotation",
97+
"annotations.tests.NonAggregateAnnotationTestCase.test_joined_annotation",
9298
"defer.tests.DeferTests.test_defer_foreign_keys_are_deferred_and_not_traversed",
9399
"defer.tests.DeferTests.test_defer_with_select_related",
94100
"defer.tests.DeferTests.test_only_with_select_related",
@@ -126,17 +132,26 @@ class DatabaseFeatures(BaseDatabaseFeatures):
126132
},
127133
# https://github.com/mongodb-labs/django-mongodb/issues/12
128134
"QuerySet.aggregate() not supported.": {
135+
"annotations.tests.AliasTests.test_filter_alias_agg_with_double_f",
136+
"annotations.tests.NonAggregateAnnotationTestCase.test_aggregate_over_annotation",
137+
"annotations.tests.NonAggregateAnnotationTestCase.test_aggregate_over_full_expression_annotation",
138+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_exists_aggregate_values_chaining",
139+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_in_f_grouped_by_annotation",
140+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_subquery_and_aggregate_values_chaining",
141+
"annotations.tests.NonAggregateAnnotationTestCase.test_filter_agg_with_double_f",
129142
"lookup.tests.LookupQueryingTests.test_aggregate_combined_lookup",
130143
"from_db_value.tests.FromDBValueTest.test_aggregation",
131144
"timezones.tests.LegacyDatabaseTests.test_query_aggregation",
132145
"timezones.tests.NewDatabaseTests.test_query_aggregation",
133146
},
134147
"QuerySet.annotate() has some limitations.": {
135148
# Exists not supported.
149+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_exists_none_query",
136150
"lookup.tests.LookupTests.test_exact_exists",
137151
"lookup.tests.LookupTests.test_nested_outerref_lhs",
138152
"lookup.tests.LookupQueryingTests.test_filter_exists_lhs",
139153
# QuerySet.alias() doesn't work.
154+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_and_alias_filter_in_subquery",
140155
"lookup.tests.LookupQueryingTests.test_alias",
141156
# annotate() with combined expressions doesn't work:
142157
# 'WhereNode' object has no attribute 'field'
@@ -150,13 +165,55 @@ class DatabaseFeatures(BaseDatabaseFeatures):
150165
# Subquery not supported.
151166
"lookup.tests.LookupQueryingTests.test_filter_subquery_lhs",
152167
# ExpressionWrapper not supported.
168+
"annotations.tests.NonAggregateAnnotationTestCase.test_combined_expression_annotation_with_aggregation",
169+
"annotations.tests.NonAggregateAnnotationTestCase.test_combined_f_expression_annotation_with_aggregation",
170+
"annotations.tests.NonAggregateAnnotationTestCase.test_empty_expression_annotation",
171+
"annotations.tests.NonAggregateAnnotationTestCase.test_full_expression_annotation",
172+
"annotations.tests.NonAggregateAnnotationTestCase.test_full_expression_annotation_with_aggregation",
173+
"annotations.tests.NonAggregateAnnotationTestCase.test_grouping_by_q_expression_annotation",
174+
"annotations.tests.NonAggregateAnnotationTestCase.test_mixed_type_annotation_numbers",
175+
"annotations.tests.NonAggregateAnnotationTestCase.test_q_expression_annotation_with_aggregation",
153176
"lookup.tests.LookupQueryingTests.test_filter_wrapped_lookup_lhs",
177+
# Length not implemented.
178+
"annotations.tests.NonAggregateAnnotationTestCase.test_chaining_transforms",
179+
# CombinedExpression not implemented.
180+
"annotations.tests.NonAggregateAnnotationTestCase.test_combined_annotation_commutative",
181+
"annotations.tests.NonAggregateAnnotationTestCase.test_decimal_annotation",
182+
"annotations.tests.NonAggregateAnnotationTestCase.test_defer_annotation",
183+
"annotations.tests.NonAggregateAnnotationTestCase.test_filter_decimal_annotation",
184+
"annotations.tests.NonAggregateAnnotationTestCase.test_values_annotation",
185+
# Func not implemented.
186+
"annotations.tests.NonAggregateAnnotationTestCase.test_custom_functions",
187+
"annotations.tests.NonAggregateAnnotationTestCase.test_custom_functions_can_ref_other_functions",
188+
# Floor not implemented.
189+
"annotations.tests.NonAggregateAnnotationTestCase.test_custom_transform_annotation",
190+
# Subquery not supported.
191+
"annotations.tests.NonAggregateAnnotationTestCase.test_empty_queryset_annotation",
192+
# Coalesce not implemented.
193+
"annotations.tests.AliasTests.test_alias_annotation_expression",
194+
"annotations.tests.NonAggregateAnnotationTestCase.test_full_expression_wrapped_annotation",
195+
# BaseDatabaseOperations may require a datetime_extract_sql().
196+
"annotations.tests.NonAggregateAnnotationTestCase.test_joined_transformed_annotation",
197+
# BaseDatabaseOperations may require a format_for_duration_arithmetic().
198+
"annotations.tests.NonAggregateAnnotationTestCase.test_mixed_type_annotation_date_interval",
199+
# FieldDoesNotExist with ordering.
200+
"annotations.tests.AliasTests.test_order_by_alias",
201+
"annotations.tests.NonAggregateAnnotationTestCase.test_order_by_aggregate",
202+
"annotations.tests.NonAggregateAnnotationTestCase.test_order_by_annotation",
203+
},
204+
"Count doesn't work in QuerySet.annotate()": {
205+
"annotations.tests.AliasTests.test_alias_annotate_with_aggregation",
206+
"annotations.tests.AliasTests.test_order_by_alias_aggregate",
207+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotate_exists",
208+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotate_with_aggregation",
154209
},
155210
"QuerySet.dates() is not supported on MongoDB.": {
211+
"annotations.tests.AliasTests.test_dates_alias",
156212
"dates.tests.DatesTests.test_dates_trunc_datetime_fields",
157213
"dates.tests.DatesTests.test_related_model_traverse",
158214
},
159215
"QuerySet.datetimes() is not supported on MongoDB.": {
216+
"annotations.tests.AliasTests.test_datetimes_alias",
160217
"datetimes.tests.DateTimesTests.test_21432",
161218
"datetimes.tests.DateTimesTests.test_datetimes_has_lazy_iterator",
162219
"datetimes.tests.DateTimesTests.test_datetimes_returns_available_dates_for_given_scope_and_given_field",
@@ -169,13 +226,25 @@ class DatabaseFeatures(BaseDatabaseFeatures):
169226
"update.tests.AdvancedTests.test_update_all",
170227
},
171228
"QuerySet.extra() is not supported.": {
229+
"annotations.tests.NonAggregateAnnotationTestCase.test_column_field_ordering",
230+
"annotations.tests.NonAggregateAnnotationTestCase.test_column_field_ordering_with_deferred",
172231
"basic.tests.ModelTest.test_extra_method_select_argument_with_dashes",
173232
"basic.tests.ModelTest.test_extra_method_select_argument_with_dashes_and_values",
174233
"defer.tests.DeferTests.test_defer_extra",
175234
"lookup.tests.LookupTests.test_values",
176235
"lookup.tests.LookupTests.test_values_list",
177236
},
178237
"Queries with multiple tables are not supported.": {
238+
"annotations.tests.AliasTests.test_alias_default_alias_expression",
239+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_aggregate_with_m2o",
240+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_and_alias_filter_related_in_subquery",
241+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_filter_with_subquery",
242+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_reverse_m2m",
243+
"annotations.tests.NonAggregateAnnotationTestCase.test_mti_annotations",
244+
"annotations.tests.NonAggregateAnnotationTestCase.test_values_with_pk_annotation",
245+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_subquery_outerref_transform",
246+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_with_m2m",
247+
"annotations.tests.NonAggregateAnnotationTestCase.test_chaining_annotation_filter_with_m2m",
179248
"defer.tests.BigChildDeferTests.test_defer_baseclass_when_subclass_has_added_field",
180249
"defer.tests.BigChildDeferTests.test_defer_subclass",
181250
"defer.tests.BigChildDeferTests.test_defer_subclass_both",
@@ -210,6 +279,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
210279
"lookup.tests.LookupTests.test_textfield_exact_null",
211280
},
212281
"Test executes raw SQL.": {
282+
"annotations.tests.NonAggregateAnnotationTestCase.test_raw_sql_with_inherited_field",
213283
"timezones.tests.LegacyDatabaseTests.test_cursor_execute_accepts_naive_datetime",
214284
"timezones.tests.LegacyDatabaseTests.test_cursor_execute_returns_naive_datetime",
215285
"timezones.tests.LegacyDatabaseTests.test_raw_sql",

0 commit comments

Comments
 (0)