Skip to content

Commit db3b2d0

Browse files
committed
add annotations test skips
1 parent 5a810bd commit db3b2d0

File tree

2 files changed

+70
-2
lines changed

2 files changed

+70
-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: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ class DatabaseFeatures(BaseDatabaseFeatures):
3636
# 'TruncDate' object has no attribute 'as_mql'.
3737
"model_fields.test_datetimefield.DateTimeFieldTests.test_lookup_date_with_use_tz",
3838
"model_fields.test_datetimefield.DateTimeFieldTests.test_lookup_date_without_use_tz",
39+
# BaseDatabaseOperations.date_extract_sql() not implemented.
40+
"annotations.tests.AliasTests.test_basic_alias_f_transform_annotation",
3941
# Slicing with QuerySet.count() doesn't work.
4042
"lookup.tests.LookupTests.test_count",
4143
# Lookup in order_by() not supported:
@@ -70,6 +72,8 @@ class DatabaseFeatures(BaseDatabaseFeatures):
7072
"model_fields.test_uuid.TestQuerying.test_startswith",
7173
},
7274
"QuerySet.update() with expression not supported.": {
75+
"annotations.tests.AliasTests.test_update_with_alias",
76+
"annotations.tests.NonAggregateAnnotationTestCase.test_update_with_annotation",
7377
"model_fields.test_integerfield.PositiveIntegerFieldTests.test_negative_values",
7478
"timezones.tests.NewDatabaseTests.test_update_with_timedelta",
7579
"update.tests.AdvancedTests.test_update_annotated_queryset",
@@ -85,6 +89,8 @@ class DatabaseFeatures(BaseDatabaseFeatures):
8589
"model_fields.test_autofield.SmallAutoFieldTests",
8690
},
8791
"QuerySet.select_related() not supported.": {
92+
"annotations.tests.AliasTests.test_joined_alias_annotation",
93+
"annotations.tests.NonAggregateAnnotationTestCase.test_joined_annotation",
8894
"defer.tests.DeferTests.test_defer_foreign_keys_are_deferred_and_not_traversed",
8995
"defer.tests.DeferTests.test_defer_with_select_related",
9096
"defer.tests.DeferTests.test_only_with_select_related",
@@ -122,17 +128,26 @@ class DatabaseFeatures(BaseDatabaseFeatures):
122128
},
123129
# https://github.com/mongodb-labs/django-mongodb/issues/12
124130
"QuerySet.aggregate() not supported.": {
131+
"annotations.tests.AliasTests.test_filter_alias_agg_with_double_f",
132+
"annotations.tests.NonAggregateAnnotationTestCase.test_aggregate_over_annotation",
133+
"annotations.tests.NonAggregateAnnotationTestCase.test_aggregate_over_full_expression_annotation",
134+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_exists_aggregate_values_chaining",
135+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_in_f_grouped_by_annotation",
136+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_subquery_and_aggregate_values_chaining",
137+
"annotations.tests.NonAggregateAnnotationTestCase.test_filter_agg_with_double_f",
125138
"lookup.tests.LookupQueryingTests.test_aggregate_combined_lookup",
126139
"from_db_value.tests.FromDBValueTest.test_aggregation",
127140
"timezones.tests.LegacyDatabaseTests.test_query_aggregation",
128141
"timezones.tests.NewDatabaseTests.test_query_aggregation",
129142
},
130143
"QuerySet.annotate() has some limitations.": {
131144
# Exists not supported.
145+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_exists_none_query",
132146
"lookup.tests.LookupTests.test_exact_exists",
133147
"lookup.tests.LookupTests.test_nested_outerref_lhs",
134148
"lookup.tests.LookupQueryingTests.test_filter_exists_lhs",
135149
# QuerySet.alias() doesn't work.
150+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_and_alias_filter_in_subquery",
136151
"lookup.tests.LookupQueryingTests.test_alias",
137152
# annotate() with combined expressions doesn't work:
138153
# 'WhereNode' object has no attribute 'field'
@@ -144,15 +159,56 @@ class DatabaseFeatures(BaseDatabaseFeatures):
144159
# Using expression in filter() doesn't work.
145160
"lookup.tests.LookupQueryingTests.test_filter_lookup_lhs",
146161
# Subquery not supported.
162+
"annotations.tests.NonAggregateAnnotationTestCase.test_empty_queryset_annotation",
147163
"lookup.tests.LookupQueryingTests.test_filter_subquery_lhs",
148164
# ExpressionWrapper not supported.
165+
"annotations.tests.NonAggregateAnnotationTestCase.test_combined_expression_annotation_with_aggregation",
166+
"annotations.tests.NonAggregateAnnotationTestCase.test_combined_f_expression_annotation_with_aggregation",
167+
"annotations.tests.NonAggregateAnnotationTestCase.test_empty_expression_annotation",
168+
"annotations.tests.NonAggregateAnnotationTestCase.test_full_expression_annotation",
169+
"annotations.tests.NonAggregateAnnotationTestCase.test_full_expression_annotation_with_aggregation",
170+
"annotations.tests.NonAggregateAnnotationTestCase.test_grouping_by_q_expression_annotation",
171+
"annotations.tests.NonAggregateAnnotationTestCase.test_mixed_type_annotation_numbers",
172+
"annotations.tests.NonAggregateAnnotationTestCase.test_q_expression_annotation_with_aggregation",
149173
"lookup.tests.LookupQueryingTests.test_filter_wrapped_lookup_lhs",
174+
# Length not implemented.
175+
"annotations.tests.NonAggregateAnnotationTestCase.test_chaining_transforms",
176+
# CombinedExpression not implemented.
177+
"annotations.tests.NonAggregateAnnotationTestCase.test_combined_annotation_commutative",
178+
"annotations.tests.NonAggregateAnnotationTestCase.test_decimal_annotation",
179+
"annotations.tests.NonAggregateAnnotationTestCase.test_defer_annotation",
180+
"annotations.tests.NonAggregateAnnotationTestCase.test_filter_decimal_annotation",
181+
"annotations.tests.NonAggregateAnnotationTestCase.test_values_annotation",
182+
# Func not implemented.
183+
"annotations.tests.NonAggregateAnnotationTestCase.test_custom_functions",
184+
"annotations.tests.NonAggregateAnnotationTestCase.test_custom_functions_can_ref_other_functions",
185+
# Floor not implemented.
186+
"annotations.tests.NonAggregateAnnotationTestCase.test_custom_transform_annotation",
187+
# Coalesce not implemented.
188+
"annotations.tests.AliasTests.test_alias_annotation_expression",
189+
"annotations.tests.NonAggregateAnnotationTestCase.test_full_expression_wrapped_annotation",
190+
# BaseDatabaseOperations may require a datetime_extract_sql().
191+
"annotations.tests.NonAggregateAnnotationTestCase.test_joined_transformed_annotation",
192+
# BaseDatabaseOperations may require a format_for_duration_arithmetic().
193+
"annotations.tests.NonAggregateAnnotationTestCase.test_mixed_type_annotation_date_interval",
194+
# FieldDoesNotExist with ordering.
195+
"annotations.tests.AliasTests.test_order_by_alias",
196+
"annotations.tests.NonAggregateAnnotationTestCase.test_order_by_aggregate",
197+
"annotations.tests.NonAggregateAnnotationTestCase.test_order_by_annotation",
198+
},
199+
"Count doesn't work in QuerySet.annotate()": {
200+
"annotations.tests.AliasTests.test_alias_annotate_with_aggregation",
201+
"annotations.tests.AliasTests.test_order_by_alias_aggregate",
202+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotate_exists",
203+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotate_with_aggregation",
150204
},
151205
"QuerySet.dates() is not supported on MongoDB.": {
206+
"annotations.tests.AliasTests.test_dates_alias",
152207
"dates.tests.DatesTests.test_dates_trunc_datetime_fields",
153208
"dates.tests.DatesTests.test_related_model_traverse",
154209
},
155210
"QuerySet.datetimes() is not supported on MongoDB.": {
211+
"annotations.tests.AliasTests.test_datetimes_alias",
156212
"datetimes.tests.DateTimesTests.test_21432",
157213
"datetimes.tests.DateTimesTests.test_datetimes_has_lazy_iterator",
158214
"datetimes.tests.DateTimesTests.test_datetimes_returns_available_dates_for_given_scope_and_given_field",
@@ -165,13 +221,25 @@ class DatabaseFeatures(BaseDatabaseFeatures):
165221
"update.tests.AdvancedTests.test_update_all",
166222
},
167223
"QuerySet.extra() is not supported.": {
224+
"annotations.tests.NonAggregateAnnotationTestCase.test_column_field_ordering",
225+
"annotations.tests.NonAggregateAnnotationTestCase.test_column_field_ordering_with_deferred",
168226
"basic.tests.ModelTest.test_extra_method_select_argument_with_dashes",
169227
"basic.tests.ModelTest.test_extra_method_select_argument_with_dashes_and_values",
170228
"defer.tests.DeferTests.test_defer_extra",
171229
"lookup.tests.LookupTests.test_values",
172230
"lookup.tests.LookupTests.test_values_list",
173231
},
174232
"Queries with multiple tables are not supported.": {
233+
"annotations.tests.AliasTests.test_alias_default_alias_expression",
234+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_aggregate_with_m2o",
235+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_and_alias_filter_related_in_subquery",
236+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_filter_with_subquery",
237+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_reverse_m2m",
238+
"annotations.tests.NonAggregateAnnotationTestCase.test_mti_annotations",
239+
"annotations.tests.NonAggregateAnnotationTestCase.test_values_with_pk_annotation",
240+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_subquery_outerref_transform",
241+
"annotations.tests.NonAggregateAnnotationTestCase.test_annotation_with_m2m",
242+
"annotations.tests.NonAggregateAnnotationTestCase.test_chaining_annotation_filter_with_m2m",
175243
"defer.tests.BigChildDeferTests.test_defer_baseclass_when_subclass_has_added_field",
176244
"defer.tests.BigChildDeferTests.test_defer_subclass",
177245
"defer.tests.BigChildDeferTests.test_defer_subclass_both",
@@ -206,6 +274,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
206274
"lookup.tests.LookupTests.test_textfield_exact_null",
207275
},
208276
"Test executes raw SQL.": {
277+
"annotations.tests.NonAggregateAnnotationTestCase.test_raw_sql_with_inherited_field",
209278
"timezones.tests.LegacyDatabaseTests.test_cursor_execute_accepts_naive_datetime",
210279
"timezones.tests.LegacyDatabaseTests.test_cursor_execute_returns_naive_datetime",
211280
"timezones.tests.LegacyDatabaseTests.test_raw_sql",

0 commit comments

Comments
 (0)