From b8829e74855c9cc816e8333eeabe0f5685181d26 Mon Sep 17 00:00:00 2001 From: Oskar Persson Date: Mon, 21 Dec 2020 22:30:01 +0100 Subject: [PATCH 1/9] Cleanup --- test.sh | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/test.sh b/test.sh index 644249f8..6360bb11 100755 --- a/test.sh +++ b/test.sh @@ -13,43 +13,24 @@ git checkout $DJANGO_VERSION pip install -r tests/requirements/py3.txt python tests/runtests.py --settings=testapp.settings --noinput --keepdb \ - aggregation \ - aggregation_regress \ - annotations \ - backends \ - basic \ - bulk_create \ - constraints \ custom_columns \ - custom_lookups \ custom_managers \ custom_methods \ custom_migration_operations \ custom_pk \ - datatypes \ dates \ - datetimes \ - db_functions \ db_typecasts \ db_utils \ - dbshell \ defer \ - defer_regress \ - delete \ - delete_regress \ distinct_on_fields \ empty \ - expressions \ - expressions_case \ expressions_window \ extra_regress \ field_deconstruction \ field_defaults \ field_subclassing \ filtered_relation \ - fixtures \ fixtures_model_package \ - fixtures_regress \ force_insert_update \ foreign_object \ from_db_value \ @@ -57,13 +38,7 @@ python tests/runtests.py --settings=testapp.settings --noinput --keepdb \ generic_relations_regress \ get_earliest_or_latest \ get_object_or_404 \ - get_or_create \ - indexes \ - inspectdb \ - introspection \ - invalid_models_tests \ known_related_objects \ - lookup \ m2m_and_m2o \ m2m_intermediary \ m2m_multiple \ @@ -76,13 +51,6 @@ python tests/runtests.py --settings=testapp.settings --noinput --keepdb \ many_to_many \ many_to_one \ max_lengths \ - migrate_signals \ - migration_test_data_persistence \ - migrations \ - migrations2 \ - model_fields \ - model_indexes \ - model_options \ mutually_referential \ nested_foreign_keys \ null_fk \ @@ -91,20 +59,14 @@ python tests/runtests.py --settings=testapp.settings --noinput --keepdb \ one_to_one \ or_lookups \ order_with_respect_to \ - ordering \ pagination \ prefetch_related \ - queries \ queryset_pickle \ raw_query \ reverse_lookup \ save_delete_hooks \ - schema \ - select_for_update \ select_related \ select_related_onetoone \ select_related_regress \ - transaction_hooks \ - transactions \ update \ update_only_fields From b6da293089bcac60b3d92bd75f365c8d2a84ba1e Mon Sep 17 00:00:00 2001 From: Oskar Persson Date: Tue, 22 Dec 2020 00:09:50 +0100 Subject: [PATCH 2/9] Run ordering tests --- sql_server/pyodbc/features.py | 1 + test.sh | 1 + testapp/runner.py | 18 ++++++++++++++++++ testapp/settings.py | 7 +++++++ 4 files changed, 27 insertions(+) create mode 100644 testapp/runner.py diff --git a/sql_server/pyodbc/features.py b/sql_server/pyodbc/features.py index f78ae730..4eb39115 100644 --- a/sql_server/pyodbc/features.py +++ b/sql_server/pyodbc/features.py @@ -36,6 +36,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): uses_savepoints = True supports_order_by_nulls_modifier = False supports_order_by_is_nulls = False + order_by_nulls_first = True @cached_property def has_bulk_insert(self): diff --git a/test.sh b/test.sh index 6360bb11..a81f19ac 100755 --- a/test.sh +++ b/test.sh @@ -59,6 +59,7 @@ python tests/runtests.py --settings=testapp.settings --noinput --keepdb \ one_to_one \ or_lookups \ order_with_respect_to \ + ordering \ pagination \ prefetch_related \ queryset_pickle \ diff --git a/testapp/runner.py b/testapp/runner.py new file mode 100644 index 00000000..65b5db40 --- /dev/null +++ b/testapp/runner.py @@ -0,0 +1,18 @@ +from unittest import skip +from django.test.runner import DiscoverRunner +from django.conf import settings + + +EXCLUDED_TESTS = getattr(settings, 'EXCLUDED_TESTS', []) + + +class ExcludeTestSuiteRunner(DiscoverRunner): + def build_suite(self, *args, **kwargs): + suite = super().build_suite(*args, **kwargs) + for case in suite: + cls = case.__class__ + for attr in cls.__dict__: + if f'{cls.__module__}.{cls.__name__}.{attr}' in EXCLUDED_TESTS: + setattr(cls, attr, skip(getattr(cls, attr))) + + return suite diff --git a/testapp/settings.py b/testapp/settings.py index 07106562..3c212387 100644 --- a/testapp/settings.py +++ b/testapp/settings.py @@ -13,6 +13,13 @@ 'testapp', ) + +TEST_RUNNER = 'testapp.runner.ExcludeTestSuiteRunner' +EXCLUDED_TESTS = ( + 'ordering.tests.OrderingTests.test_deprecated_values_annotate', + 'ordering.tests.OrderingTests.test_orders_nulls_first_on_filtered_subquery', +) + SECRET_KEY = "django_tests_secret_key" # Use a fast hasher to speed up tests. From 3976b8b478ad747b82ced87a619536ea40bf6e75 Mon Sep 17 00:00:00 2001 From: Oskar Persson Date: Tue, 22 Dec 2020 00:52:12 +0100 Subject: [PATCH 3/9] Add aggregation and bulk_create --- test.sh | 2 ++ testapp/runner.py | 5 ++++- testapp/settings.py | 9 +++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/test.sh b/test.sh index a81f19ac..6a67c1d8 100755 --- a/test.sh +++ b/test.sh @@ -13,6 +13,8 @@ git checkout $DJANGO_VERSION pip install -r tests/requirements/py3.txt python tests/runtests.py --settings=testapp.settings --noinput --keepdb \ + aggregation \ + bulk_create \ custom_columns \ custom_managers \ custom_methods \ diff --git a/testapp/runner.py b/testapp/runner.py index 65b5db40..39314ac7 100644 --- a/testapp/runner.py +++ b/testapp/runner.py @@ -12,7 +12,10 @@ def build_suite(self, *args, **kwargs): for case in suite: cls = case.__class__ for attr in cls.__dict__: - if f'{cls.__module__}.{cls.__name__}.{attr}' in EXCLUDED_TESTS: + if not attr.startswith('test_'): + continue + fullname = f'{cls.__module__}.{cls.__name__}.{attr}' + if len(list(filter(fullname.startswith, EXCLUDED_TESTS))): setattr(cls, attr, skip(getattr(cls, attr))) return suite diff --git a/testapp/settings.py b/testapp/settings.py index 3c212387..ad0baa7b 100644 --- a/testapp/settings.py +++ b/testapp/settings.py @@ -16,8 +16,17 @@ TEST_RUNNER = 'testapp.runner.ExcludeTestSuiteRunner' EXCLUDED_TESTS = ( + 'aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation_exists', + 'aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation_values_collision', + 'aggregation.tests.AggregateTestCase.test_count_star', + 'aggregation.tests.AggregateTestCase.test_distinct_on_aggregate', + 'aggregation.tests.AggregateTestCase.test_expression_on_aggregation', + 'bulk_create.tests.BulkCreateTests.test_bulk_insert_nullable_fields', 'ordering.tests.OrderingTests.test_deprecated_values_annotate', + 'ordering.tests.OrderingTests.test_order_by_fk_attname', + 'ordering.tests.OrderingTests.test_order_by_pk', 'ordering.tests.OrderingTests.test_orders_nulls_first_on_filtered_subquery', + 'prefetch_related.tests.GenericRelationTests.test_prefetch_GFK_nonint_pk', ) SECRET_KEY = "django_tests_secret_key" From 157d650a1abdc70040bb1b50eb596183f29dac58 Mon Sep 17 00:00:00 2001 From: Oskar Persson Date: Tue, 22 Dec 2020 23:01:18 +0100 Subject: [PATCH 4/9] Fix sql_flush, add more tests --- sql_server/pyodbc/operations.py | 56 ++++++++++++++++++++------------- test.sh | 14 ++++++--- testapp/settings.py | 14 +++++++++ 3 files changed, 59 insertions(+), 25 deletions(-) diff --git a/sql_server/pyodbc/operations.py b/sql_server/pyodbc/operations.py index 64ef7e69..fd4677b9 100644 --- a/sql_server/pyodbc/operations.py +++ b/sql_server/pyodbc/operations.py @@ -314,7 +314,33 @@ def savepoint_rollback_sql(self, sid): """ return "ROLLBACK TRANSACTION %s" % sid - def sql_flush(self, style, tables, *, reset_sequences=False, allow_cascade=False): + def _build_sequences(self, sequences, cursor): + seqs = [] + for seq in sequences: + cursor.execute("SELECT COUNT(*) FROM %s" % self.quote_name(seq["table"])) + rowcnt = cursor.fetchone()[0] + elem = {} + if rowcnt: + elem['start_id'] = 0 + else: + elem['start_id'] = 1 + elem.update(seq) + seqs.append(elem) + return seqs + + def _sql_flush_new(self, style, tables, *, reset_sequences=False, allow_cascade=False): + if reset_sequences: + return [ + sequence + for sequence in self.connection.introspection.sequence_list() + ] + + return [] + + def _sql_flush_old(self, style, tables, sequences, allow_cascade=False): + return sequences + + def sql_flush(self, style, tables, *args, **kwargs): """ Returns a list of SQL statements required to remove all data from the given database tables (without actually removing the tables @@ -329,31 +355,19 @@ def sql_flush(self, style, tables, *, reset_sequences=False, allow_cascade=False The `allow_cascade` argument determines whether truncation may cascade to tables with foreign keys pointing the tables being truncated. """ + if not tables: return [] - # Cannot use TRUNCATE on tables that are referenced by a FOREIGN KEY - # So must use the much slower DELETE + if django.VERSION >= (3, 1): + sequences = self._sql_flush_new(style, tables, *args, **kwargs) + else: + sequences = self._sql_flush_old(style, tables, *args, **kwargs) + from django.db import connections cursor = connections[self.connection.alias].cursor() - # Try to minimize the risks of the braindeaded inconsistency in - # DBCC CHEKIDENT(table, RESEED, n) behavior. - seqs = [] - if reset_sequences: - sequences = [ - sequence - for sequence in self.connection.introspection.sequence_list() - ] - for seq in sequences: - cursor.execute("SELECT COUNT(*) FROM %s" % self.quote_name(seq["table"])) - rowcnt = cursor.fetchone()[0] - elem = {} - if rowcnt: - elem['start_id'] = 0 - else: - elem['start_id'] = 1 - elem.update(seq) - seqs.append(elem) + + seqs = self._build_sequences(sequences, cursor) COLUMNS = "TABLE_NAME, CONSTRAINT_NAME" WHERE = "CONSTRAINT_TYPE not in ('PRIMARY KEY','UNIQUE')" diff --git a/test.sh b/test.sh index 6a67c1d8..821927c5 100755 --- a/test.sh +++ b/test.sh @@ -8,12 +8,16 @@ set -e DJANGO_VERSION="$(python -m django --version)" cd django -git fetch --depth=1 origin +refs/tags/*:refs/tags/* -git checkout $DJANGO_VERSION -pip install -r tests/requirements/py3.txt +git fetch -q --depth=1 origin +refs/tags/*:refs/tags/* +git checkout -q $DJANGO_VERSION +pip install -q -r tests/requirements/py3.txt -python tests/runtests.py --settings=testapp.settings --noinput --keepdb \ +python tests/runtests.py --settings=testapp.settings --noinput \ aggregation \ + aggregation_regress \ + annotations \ + backends \ + basic \ bulk_create \ custom_columns \ custom_managers \ @@ -26,6 +30,7 @@ python tests/runtests.py --settings=testapp.settings --noinput --keepdb \ defer \ distinct_on_fields \ empty \ + expressions_case \ expressions_window \ extra_regress \ field_deconstruction \ @@ -40,6 +45,7 @@ python tests/runtests.py --settings=testapp.settings --noinput --keepdb \ generic_relations_regress \ get_earliest_or_latest \ get_object_or_404 \ + introspection \ known_related_objects \ m2m_and_m2o \ m2m_intermediary \ diff --git a/testapp/settings.py b/testapp/settings.py index ad0baa7b..40404118 100644 --- a/testapp/settings.py +++ b/testapp/settings.py @@ -21,7 +21,21 @@ 'aggregation.tests.AggregateTestCase.test_count_star', 'aggregation.tests.AggregateTestCase.test_distinct_on_aggregate', 'aggregation.tests.AggregateTestCase.test_expression_on_aggregation', + 'aggregation_regress.tests.AggregationTests.test_annotated_conditional_aggregate', + 'aggregation_regress.tests.AggregationTests.test_annotation_with_value', + 'aggregation_regress.tests.AggregationTests.test_values_list_annotation_args_ordering', + 'annotations.tests.NonAggregateAnnotationTestCase.test_annotate_exists', + 'annotations.tests.NonAggregateAnnotationTestCase.test_combined_expression_annotation_with_aggregation', + 'backends.tests.BackendTestCase.test_queries', + 'backends.tests.BackendTestCase.test_unicode_password', + 'backends.tests.FkConstraintsTests.test_disable_constraint_checks_context_manager', + 'backends.tests.FkConstraintsTests.test_disable_constraint_checks_manually', + 'backends.tests.LastExecutedQueryTest.test_last_executed_query', 'bulk_create.tests.BulkCreateTests.test_bulk_insert_nullable_fields', + 'expressions_case.tests.CaseExpressionTests.test_annotate_with_in_clause', + 'introspection.tests.IntrospectionTests.test_get_constraints', + 'introspection.tests.IntrospectionTests.test_get_table_description_types', + 'introspection.tests.IntrospectionTests.test_smallautofield', 'ordering.tests.OrderingTests.test_deprecated_values_annotate', 'ordering.tests.OrderingTests.test_order_by_fk_attname', 'ordering.tests.OrderingTests.test_order_by_pk', From 9c688c0fb92d8384b492a0bfe1f2b6a119c78b01 Mon Sep 17 00:00:00 2001 From: Oskar Persson Date: Mon, 28 Dec 2020 18:38:48 +0100 Subject: [PATCH 5/9] Partially fix iso_year and Mod, add more tests --- sql_server/pyodbc/functions.py | 7 +++++- sql_server/pyodbc/operations.py | 2 ++ test.sh | 24 ++++++++++++++++++++- testapp/runner.py | 2 +- testapp/settings.py | 38 +++++++++++++++++++++++++++++++++ 5 files changed, 70 insertions(+), 3 deletions(-) diff --git a/sql_server/pyodbc/functions.py b/sql_server/pyodbc/functions.py index 967f5ffb..c2cc6656 100644 --- a/sql_server/pyodbc/functions.py +++ b/sql_server/pyodbc/functions.py @@ -1,7 +1,7 @@ from django import VERSION from django.db.models import BooleanField from django.db.models.functions import Cast -from django.db.models.functions.math import ATan2, Log, Ln, Round +from django.db.models.functions.math import ATan2, Log, Ln, Mod, Round from django.db.models.expressions import Case, Exists, OrderBy, When from django.db.models.lookups import Lookup @@ -54,6 +54,10 @@ def sqlserver_ln(self, compiler, connection, **extra_context): return self.as_sql(compiler, connection, function='LOG', **extra_context) +def sqlserver_mod(self, compiler, connection, **extra_context): + return self.as_sql(compiler, connection, template='%(expressions)s', arg_joiner='%%', **extra_context) + + def sqlserver_round(self, compiler, connection, **extra_context): return self.as_sql(compiler, connection, template='%(function)s(%(expressions)s, 0)', **extra_context) @@ -105,6 +109,7 @@ def sqlserver_orderby(self, compiler, connection): ATan2.as_microsoft = sqlserver_atan2 Log.as_microsoft = sqlserver_log Ln.as_microsoft = sqlserver_ln +Mod.as_microsoft = sqlserver_mod Round.as_microsoft = sqlserver_round if DJANGO3: diff --git a/sql_server/pyodbc/operations.py b/sql_server/pyodbc/operations.py index fd4677b9..00eebec0 100644 --- a/sql_server/pyodbc/operations.py +++ b/sql_server/pyodbc/operations.py @@ -114,6 +114,8 @@ def date_extract_sql(self, lookup_type, field_name): return "DATEPART(weekday, %s)" % field_name elif lookup_type == 'week': return "DATEPART(iso_week, %s)" % field_name + elif lookup_type == 'iso_year': + return "YEAR(DATEADD(day, 26 - DATEPART(isoww, %s), %s))" % (field_name, field_name) else: return "DATEPART(%s, %s)" % (lookup_type, field_name) diff --git a/test.sh b/test.sh index 821927c5..2672bd20 100755 --- a/test.sh +++ b/test.sh @@ -12,7 +12,7 @@ git fetch -q --depth=1 origin +refs/tags/*:refs/tags/* git checkout -q $DJANGO_VERSION pip install -q -r tests/requirements/py3.txt -python tests/runtests.py --settings=testapp.settings --noinput \ +python tests/runtests.py --settings=testapp.settings --noinput --keepdb \ aggregation \ aggregation_regress \ annotations \ @@ -20,16 +20,25 @@ python tests/runtests.py --settings=testapp.settings --noinput \ basic \ bulk_create \ custom_columns \ + custom_lookups \ custom_managers \ custom_methods \ custom_migration_operations \ custom_pk \ + datatypes \ dates \ + datetimes \ + db_functions \ db_typecasts \ db_utils \ + dbshell \ defer \ + defer_regress \ + delete \ + delete_regress \ distinct_on_fields \ empty \ + expressions \ expressions_case \ expressions_window \ extra_regress \ @@ -37,6 +46,7 @@ python tests/runtests.py --settings=testapp.settings --noinput \ field_defaults \ field_subclassing \ filtered_relation \ + fixtures \ fixtures_model_package \ force_insert_update \ foreign_object \ @@ -45,8 +55,13 @@ python tests/runtests.py --settings=testapp.settings --noinput \ generic_relations_regress \ get_earliest_or_latest \ get_object_or_404 \ + get_or_create \ + indexes \ + inspectdb \ introspection \ + invalid_models_tests \ known_related_objects \ + lookup \ m2m_and_m2o \ m2m_intermediary \ m2m_multiple \ @@ -59,6 +74,9 @@ python tests/runtests.py --settings=testapp.settings --noinput \ many_to_many \ many_to_one \ max_lengths \ + model_fields \ + model_indexes \ + model_options \ mutually_referential \ nested_foreign_keys \ null_fk \ @@ -70,12 +88,16 @@ python tests/runtests.py --settings=testapp.settings --noinput \ ordering \ pagination \ prefetch_related \ + queries \ queryset_pickle \ raw_query \ reverse_lookup \ save_delete_hooks \ + select_for_update \ select_related \ select_related_onetoone \ select_related_regress \ + transaction_hooks \ + transactions \ update \ update_only_fields diff --git a/testapp/runner.py b/testapp/runner.py index 39314ac7..e7e73070 100644 --- a/testapp/runner.py +++ b/testapp/runner.py @@ -11,7 +11,7 @@ def build_suite(self, *args, **kwargs): suite = super().build_suite(*args, **kwargs) for case in suite: cls = case.__class__ - for attr in cls.__dict__: + for attr in dir(cls): if not attr.startswith('test_'): continue fullname = f'{cls.__module__}.{cls.__name__}.{attr}' diff --git a/testapp/settings.py b/testapp/settings.py index 40404118..ed43c3b3 100644 --- a/testapp/settings.py +++ b/testapp/settings.py @@ -23,6 +23,9 @@ 'aggregation.tests.AggregateTestCase.test_expression_on_aggregation', 'aggregation_regress.tests.AggregationTests.test_annotated_conditional_aggregate', 'aggregation_regress.tests.AggregationTests.test_annotation_with_value', + 'aggregation_regress.tests.AggregationTests.test_more_more', + 'aggregation_regress.tests.AggregationTests.test_more_more_more', + 'aggregation_regress.tests.AggregationTests.test_ticket_11293', 'aggregation_regress.tests.AggregationTests.test_values_list_annotation_args_ordering', 'annotations.tests.NonAggregateAnnotationTestCase.test_annotate_exists', 'annotations.tests.NonAggregateAnnotationTestCase.test_combined_expression_annotation_with_aggregation', @@ -32,15 +35,50 @@ 'backends.tests.FkConstraintsTests.test_disable_constraint_checks_manually', 'backends.tests.LastExecutedQueryTest.test_last_executed_query', 'bulk_create.tests.BulkCreateTests.test_bulk_insert_nullable_fields', + 'custom_lookups.tests.BilateralTransformTests.test_transform_order_by', + 'datatypes.tests.DataTypesTestCase.test_error_on_timezone', + 'datetimes.tests.DateTimesTests.test_datetimes_returns_available_dates_for_given_scope_and_given_field', + 'datetimes.tests.DateTimesTests.test_related_model_traverse', + 'db_functions.comparison.test_cast.CastTests.test_cast_to_integer', + 'db_functions.datetime.test_extract_trunc.DateFunctionTests.test_trunc_func', + 'db_functions.datetime.test_extract_trunc.DateFunctionTests.test_trunc_week_func', + 'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_extract_func_with_timezone', + 'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_trunc_func_with_timezone', + 'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_trunc_none', + 'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_trunc_week_func', + 'db_functions.math.test_degrees.DegreesTests.test_integer', + 'db_functions.math.test_mod.ModTests.test_float', + 'db_functions.math.test_power.PowerTests.test_integer', + 'db_functions.math.test_radians.RadiansTests.test_integer', + 'db_functions.text.test_pad.PadTests.test_pad', + 'db_functions.text.test_replace.ReplaceTests.test_case_sensitive', + 'defer_regress.tests.DeferRegressionTest.test_ticket_23270', + 'expressions.tests.BasicExpressionsTests.test_filtering_on_annotate_that_uses_q', + 'expressions.tests.BasicExpressionsTests.test_order_by_exists', + 'expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_right_shift_operator', + 'expressions.tests.ExpressionOperatorTests.test_righthand_power', + 'expressions.tests.FTimeDeltaTests.test_datetime_subtraction_microseconds', + 'expressions.tests.FTimeDeltaTests.test_duration_with_datetime_microseconds', + 'expressions.tests.FTimeDeltaTests.test_invalid_operator', + 'expressions.tests.IterableLookupInnerExpressionsTests.test_expressions_in_lookups_join_choice', 'expressions_case.tests.CaseExpressionTests.test_annotate_with_in_clause', + 'get_or_create.tests.UpdateOrCreateTransactionTests.test_creation_in_transaction', + 'indexes.tests.PartialIndexTests.test_multiple_conditions', + 'indexes.tests.SchemaIndexesNotPostgreSQLTests.test_create_index_ignores_opclasses', + 'inspectdb.tests.InspectDBTestCase.test_introspection_errors', 'introspection.tests.IntrospectionTests.test_get_constraints', 'introspection.tests.IntrospectionTests.test_get_table_description_types', 'introspection.tests.IntrospectionTests.test_smallautofield', + 'invalid_models_tests.test_ordinary_fields.TextFieldTests.test_max_length_warning', + 'model_indexes.tests.IndexesTests.test_db_tablespace', 'ordering.tests.OrderingTests.test_deprecated_values_annotate', 'ordering.tests.OrderingTests.test_order_by_fk_attname', 'ordering.tests.OrderingTests.test_order_by_pk', 'ordering.tests.OrderingTests.test_orders_nulls_first_on_filtered_subquery', 'prefetch_related.tests.GenericRelationTests.test_prefetch_GFK_nonint_pk', + 'queries.test_bulk_update.BulkUpdateNoteTests.test_set_field_to_null', + 'queries.test_qs_combinators.QuerySetSetOperationTests.test_limits', + 'select_for_update.tests.SelectForUpdateTests.test_for_update_after_from', ) SECRET_KEY = "django_tests_secret_key" From 42ced1dfe682216a1f6cd9bd56146cca26d1c7b7 Mon Sep 17 00:00:00 2001 From: Oskar Persson Date: Mon, 28 Dec 2020 21:17:03 +0100 Subject: [PATCH 6/9] Skip JSON and crypt tests --- testapp/settings.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/testapp/settings.py b/testapp/settings.py index ed43c3b3..1bd7023b 100644 --- a/testapp/settings.py +++ b/testapp/settings.py @@ -52,6 +52,12 @@ 'db_functions.math.test_radians.RadiansTests.test_integer', 'db_functions.text.test_pad.PadTests.test_pad', 'db_functions.text.test_replace.ReplaceTests.test_case_sensitive', + 'db_functions.text.test_md5', + 'db_functions.text.test_sha1', + 'db_functions.text.test_sha224', + 'db_functions.text.test_sha256', + 'db_functions.text.test_sha384', + 'db_functions.text.test_sha512', 'defer_regress.tests.DeferRegressionTest.test_ticket_23270', 'expressions.tests.BasicExpressionsTests.test_filtering_on_annotate_that_uses_q', 'expressions.tests.BasicExpressionsTests.test_order_by_exists', @@ -66,10 +72,13 @@ 'indexes.tests.PartialIndexTests.test_multiple_conditions', 'indexes.tests.SchemaIndexesNotPostgreSQLTests.test_create_index_ignores_opclasses', 'inspectdb.tests.InspectDBTestCase.test_introspection_errors', + 'inspectdb.tests.InspectDBTestCase.test_json_field', 'introspection.tests.IntrospectionTests.test_get_constraints', 'introspection.tests.IntrospectionTests.test_get_table_description_types', 'introspection.tests.IntrospectionTests.test_smallautofield', 'invalid_models_tests.test_ordinary_fields.TextFieldTests.test_max_length_warning', + 'model_fields.test_integerfield.PositiveBigIntegerFieldTests', + 'model_fields.test_jsonfield', 'model_indexes.tests.IndexesTests.test_db_tablespace', 'ordering.tests.OrderingTests.test_deprecated_values_annotate', 'ordering.tests.OrderingTests.test_order_by_fk_attname', @@ -77,6 +86,8 @@ 'ordering.tests.OrderingTests.test_orders_nulls_first_on_filtered_subquery', 'prefetch_related.tests.GenericRelationTests.test_prefetch_GFK_nonint_pk', 'queries.test_bulk_update.BulkUpdateNoteTests.test_set_field_to_null', + 'queries.test_bulk_update.BulkUpdateTests.test_json_field', + 'queries.test_db_returning', 'queries.test_qs_combinators.QuerySetSetOperationTests.test_limits', 'select_for_update.tests.SelectForUpdateTests.test_for_update_after_from', ) From dd76d92d70f1ca65859cb7e466bd2e9b912b6d96 Mon Sep 17 00:00:00 2001 From: Oskar Persson Date: Sun, 3 Jan 2021 16:20:36 +0100 Subject: [PATCH 7/9] Skip failing 3.1 tests --- testapp/settings.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/testapp/settings.py b/testapp/settings.py index 1bd7023b..3aa3b0d1 100644 --- a/testapp/settings.py +++ b/testapp/settings.py @@ -37,12 +37,24 @@ 'bulk_create.tests.BulkCreateTests.test_bulk_insert_nullable_fields', 'custom_lookups.tests.BilateralTransformTests.test_transform_order_by', 'datatypes.tests.DataTypesTestCase.test_error_on_timezone', + 'datetimes.tests.DateTimesTests.test_datetimes_ambiguous_and_invalid_times', 'datetimes.tests.DateTimesTests.test_datetimes_returns_available_dates_for_given_scope_and_given_field', 'datetimes.tests.DateTimesTests.test_related_model_traverse', 'db_functions.comparison.test_cast.CastTests.test_cast_to_integer', + 'db_functions.datetime.test_extract_trunc.DateFunctionTests.test_extract_func', + 'db_functions.datetime.test_extract_trunc.DateFunctionTests.test_extract_iso_weekday_func', + 'db_functions.datetime.test_extract_trunc.DateFunctionTests.test_extract_year_exact_lookup', + 'db_functions.datetime.test_extract_trunc.DateFunctionTests.test_extract_year_greaterthan_lookup', + 'db_functions.datetime.test_extract_trunc.DateFunctionTests.test_extract_year_lessthan_lookup', 'db_functions.datetime.test_extract_trunc.DateFunctionTests.test_trunc_func', 'db_functions.datetime.test_extract_trunc.DateFunctionTests.test_trunc_week_func', + 'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_extract_func', 'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_extract_func_with_timezone', + 'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_extract_iso_weekday_func', + 'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_extract_year_exact_lookup', + 'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_extract_year_greaterthan_lookup', + 'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_extract_year_lessthan_lookup', + 'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_trunc_ambiguous_and_invalid_times', 'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_trunc_func_with_timezone', 'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_trunc_none', 'db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_trunc_week_func', @@ -50,22 +62,29 @@ 'db_functions.math.test_mod.ModTests.test_float', 'db_functions.math.test_power.PowerTests.test_integer', 'db_functions.math.test_radians.RadiansTests.test_integer', + 'db_functions.text.test_md5', 'db_functions.text.test_pad.PadTests.test_pad', 'db_functions.text.test_replace.ReplaceTests.test_case_sensitive', - 'db_functions.text.test_md5', 'db_functions.text.test_sha1', 'db_functions.text.test_sha224', 'db_functions.text.test_sha256', 'db_functions.text.test_sha384', 'db_functions.text.test_sha512', + 'dbshell.tests.DbshellCommandTestCase.test_command_missing', 'defer_regress.tests.DeferRegressionTest.test_ticket_23270', + 'delete.tests.DeletionTests.test_only_referenced_fields_selected', 'expressions.tests.BasicExpressionsTests.test_filtering_on_annotate_that_uses_q', 'expressions.tests.BasicExpressionsTests.test_order_by_exists', 'expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_right_shift_operator', + 'expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor', + 'expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor_null', 'expressions.tests.ExpressionOperatorTests.test_righthand_power', + 'expressions.tests.FTimeDeltaTests.test_date_subquery_subtraction', + 'expressions.tests.FTimeDeltaTests.test_datetime_subquery_subtraction', 'expressions.tests.FTimeDeltaTests.test_datetime_subtraction_microseconds', 'expressions.tests.FTimeDeltaTests.test_duration_with_datetime_microseconds', 'expressions.tests.FTimeDeltaTests.test_invalid_operator', + 'expressions.tests.FTimeDeltaTests.test_time_subquery_subtraction', 'expressions.tests.IterableLookupInnerExpressionsTests.test_expressions_in_lookups_join_choice', 'expressions_case.tests.CaseExpressionTests.test_annotate_with_in_clause', 'get_or_create.tests.UpdateOrCreateTransactionTests.test_creation_in_transaction', @@ -73,6 +92,7 @@ 'indexes.tests.SchemaIndexesNotPostgreSQLTests.test_create_index_ignores_opclasses', 'inspectdb.tests.InspectDBTestCase.test_introspection_errors', 'inspectdb.tests.InspectDBTestCase.test_json_field', + 'inspectdb.tests.InspectDBTestCase.test_number_field_types', 'introspection.tests.IntrospectionTests.test_get_constraints', 'introspection.tests.IntrospectionTests.test_get_table_description_types', 'introspection.tests.IntrospectionTests.test_smallautofield', @@ -89,6 +109,7 @@ 'queries.test_bulk_update.BulkUpdateTests.test_json_field', 'queries.test_db_returning', 'queries.test_qs_combinators.QuerySetSetOperationTests.test_limits', + 'queries.test_qs_combinators.QuerySetSetOperationTests.test_ordering_by_f_expression_and_alias', 'select_for_update.tests.SelectForUpdateTests.test_for_update_after_from', ) From 090b7440a62fb16c0152d1dd4e092436d5d4ffa0 Mon Sep 17 00:00:00 2001 From: Oskar Persson Date: Sun, 3 Jan 2021 18:05:22 +0100 Subject: [PATCH 8/9] Add back removed apps --- .github/workflows/main.yml | 2 +- test.sh | 6 ++ testapp/settings.py | 148 +++++++++++++++++++++++++++++++++++++ 3 files changed, 155 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4cdf48d8..75c9174d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,7 +29,7 @@ jobs: pip install flake8 - name: Linting run: | - flake8 + flake8 --exclude testapp build: runs-on: ${{ matrix.os }} diff --git a/test.sh b/test.sh index 2672bd20..04d20942 100755 --- a/test.sh +++ b/test.sh @@ -19,6 +19,7 @@ python tests/runtests.py --settings=testapp.settings --noinput --keepdb \ backends \ basic \ bulk_create \ + constraints \ custom_columns \ custom_lookups \ custom_managers \ @@ -48,6 +49,7 @@ python tests/runtests.py --settings=testapp.settings --noinput --keepdb \ filtered_relation \ fixtures \ fixtures_model_package \ + fixtures_regress \ force_insert_update \ foreign_object \ from_db_value \ @@ -74,6 +76,9 @@ python tests/runtests.py --settings=testapp.settings --noinput --keepdb \ many_to_many \ many_to_one \ max_lengths \ + migrate_signals \ + migration_test_data_persistence \ + migrations \ model_fields \ model_indexes \ model_options \ @@ -93,6 +98,7 @@ python tests/runtests.py --settings=testapp.settings --noinput --keepdb \ raw_query \ reverse_lookup \ save_delete_hooks \ + schema \ select_for_update \ select_related \ select_related_onetoone \ diff --git a/testapp/settings.py b/testapp/settings.py index 3aa3b0d1..e9069d7c 100644 --- a/testapp/settings.py +++ b/testapp/settings.py @@ -35,6 +35,14 @@ 'backends.tests.FkConstraintsTests.test_disable_constraint_checks_manually', 'backends.tests.LastExecutedQueryTest.test_last_executed_query', 'bulk_create.tests.BulkCreateTests.test_bulk_insert_nullable_fields', + 'constraints.tests.CheckConstraintTests.test_abstract_name', + 'constraints.tests.CheckConstraintTests.test_database_constraint', + 'constraints.tests.CheckConstraintTests.test_database_constraint_expression', + 'constraints.tests.CheckConstraintTests.test_database_constraint_expressionwrapper', + 'constraints.tests.CheckConstraintTests.test_name', + 'constraints.tests.UniqueConstraintTests.test_database_constraint', + 'constraints.tests.UniqueConstraintTests.test_database_constraint_with_condition', + 'constraints.tests.UniqueConstraintTests.test_name', 'custom_lookups.tests.BilateralTransformTests.test_transform_order_by', 'datatypes.tests.DataTypesTestCase.test_error_on_timezone', 'datetimes.tests.DateTimesTests.test_datetimes_ambiguous_and_invalid_times', @@ -73,8 +81,10 @@ 'dbshell.tests.DbshellCommandTestCase.test_command_missing', 'defer_regress.tests.DeferRegressionTest.test_ticket_23270', 'delete.tests.DeletionTests.test_only_referenced_fields_selected', + 'expressions.tests.BasicExpressionsTests.test_case_in_filter_if_boolean_output_field', 'expressions.tests.BasicExpressionsTests.test_filtering_on_annotate_that_uses_q', 'expressions.tests.BasicExpressionsTests.test_order_by_exists', + 'expressions.tests.BasicExpressionsTests.test_subquery_in_filter', 'expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_right_shift_operator', 'expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor', 'expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor_null', @@ -87,6 +97,18 @@ 'expressions.tests.FTimeDeltaTests.test_time_subquery_subtraction', 'expressions.tests.IterableLookupInnerExpressionsTests.test_expressions_in_lookups_join_choice', 'expressions_case.tests.CaseExpressionTests.test_annotate_with_in_clause', + 'fixtures_regress.tests.TestFixtures.test_loaddata_raises_error_when_fixture_has_invalid_foreign_key', + 'fixtures_regress.tests.TestFixtures.test_loaddata_with_m2m_to_self', + 'fixtures_regress.tests.TestFixtures.test_loaddata_with_valid_fixture_dirs', + 'fixtures_regress.tests.TestFixtures.test_loaddata_works_when_fixture_has_forward_refs', + 'fixtures_regress.tests.TestFixtures.test_path_containing_dots', + 'fixtures_regress.tests.TestFixtures.test_pg_sequence_resetting_checks', + 'fixtures_regress.tests.TestFixtures.test_pretty_print_xml', + 'fixtures_regress.tests.TestFixtures.test_proxy_model_included', + 'fixtures_regress.tests.TestFixtures.test_relative_path', + 'fixtures_regress.tests.TestFixtures.test_relative_path_in_fixture_dirs', + 'fixtures_regress.tests.TestFixtures.test_ticket_20820', + 'fixtures_regress.tests.TestFixtures.test_ticket_22421', 'get_or_create.tests.UpdateOrCreateTransactionTests.test_creation_in_transaction', 'indexes.tests.PartialIndexTests.test_multiple_conditions', 'indexes.tests.SchemaIndexesNotPostgreSQLTests.test_create_index_ignores_opclasses', @@ -97,6 +119,109 @@ 'introspection.tests.IntrospectionTests.test_get_table_description_types', 'introspection.tests.IntrospectionTests.test_smallautofield', 'invalid_models_tests.test_ordinary_fields.TextFieldTests.test_max_length_warning', + 'migrate_signals.tests.MigrateSignalTests.test_migrations_only', + 'migration_test_data_persistence.tests.MigrationDataNormalPersistenceTestCase.test_persistence', + 'migration_test_data_persistence.tests.MigrationDataPersistenceTestCase.test_persistence', + 'migrations.test_commands.MigrateTests.test_migrate_syncdb_app_label', + 'migrations.test_commands.MigrateTests.test_migrate_syncdb_deferred_sql_executed_with_schemaeditor', + 'migrations.test_executor.ExecutorTests.test_alter_id_type_with_fk', + 'migrations.test_operations.OperationTests.test_add_constraint_percent_escaping', + 'migrations.test_operations.OperationTests.test_add_deferred_unique_constraint', + 'migrations.test_operations.OperationTests.test_add_partial_unique_constraint', + 'migrations.test_operations.OperationTests.test_alter_field_pk', + 'migrations.test_operations.OperationTests.test_alter_field_pk_fk', + 'migrations.test_operations.OperationTests.test_alter_field_pk_fk', + 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_target_changes', + 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_target_changes', + 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_with_to_field_related_name_target_type_change', + 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_with_to_field_target_changes', + 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_with_to_field_target_changes', + 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_with_to_field_target_type_change', + 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_with_to_field_target_type_change', + 'migrations.test_operations.OperationTests.test_alter_field_with_index', + 'migrations.test_operations.OperationTests.test_alter_field_with_index', + 'migrations.test_operations.OperationTests.test_alter_fk', + 'migrations.test_operations.OperationTests.test_alter_fk_non_fk', + 'migrations.test_operations.OperationTests.test_alter_index_together', + 'migrations.test_operations.OperationTests.test_alter_index_together_remove', + 'migrations.test_operations.OperationTests.test_alter_index_together_remove_with_unique_together', + 'migrations.test_operations.OperationTests.test_alter_model_managers', + 'migrations.test_operations.OperationTests.test_alter_model_managers_emptying', + 'migrations.test_operations.OperationTests.test_alter_model_options', + 'migrations.test_operations.OperationTests.test_alter_model_options_emptying', + 'migrations.test_operations.OperationTests.test_alter_model_table', + 'migrations.test_operations.OperationTests.test_alter_model_table_m2m', + 'migrations.test_operations.OperationTests.test_alter_model_table_none', + 'migrations.test_operations.OperationTests.test_alter_model_table_noop', + 'migrations.test_operations.OperationTests.test_alter_model_table_noop', + 'migrations.test_operations.OperationTests.test_alter_order_with_respect_to', + 'migrations.test_operations.OperationTests.test_alter_unique_together', + 'migrations.test_operations.OperationTests.test_alter_unique_together_remove', + 'migrations.test_operations.OperationTests.test_autofield__bigautofield_foreignfield_growth', + 'migrations.test_operations.OperationTests.test_autofield__bigautofield_foreignfield_growth', + 'migrations.test_operations.OperationTests.test_column_name_quoting', + 'migrations.test_operations.OperationTests.test_create_model', + 'migrations.test_operations.OperationTests.test_create_model_inheritance', + 'migrations.test_operations.OperationTests.test_create_model_m2m', + 'migrations.test_operations.OperationTests.test_create_model_managers', + 'migrations.test_operations.OperationTests.test_create_model_with_constraint', + 'migrations.test_operations.OperationTests.test_create_model_with_deferred_unique_constraint', + 'migrations.test_operations.OperationTests.test_create_model_with_duplicate_base', + 'migrations.test_operations.OperationTests.test_create_model_with_duplicate_field_name', + 'migrations.test_operations.OperationTests.test_create_model_with_duplicate_manager_name', + 'migrations.test_operations.OperationTests.test_create_model_with_partial_unique_constraint', + 'migrations.test_operations.OperationTests.test_create_model_with_partial_unique_constraint', + 'migrations.test_operations.OperationTests.test_create_model_with_unique_after', + 'migrations.test_operations.OperationTests.test_create_proxy_model', + 'migrations.test_operations.OperationTests.test_create_unmanaged_model', + 'migrations.test_operations.OperationTests.test_delete_model', + 'migrations.test_operations.OperationTests.test_delete_mti_model', + 'migrations.test_operations.OperationTests.test_delete_proxy_model', + 'migrations.test_operations.OperationTests.test_model_with_bigautofield', + 'migrations.test_operations.OperationTests.test_remove_constraint', + 'migrations.test_operations.OperationTests.test_remove_deferred_unique_constraint', + 'migrations.test_operations.OperationTests.test_remove_deferred_unique_constraint', + 'migrations.test_operations.OperationTests.test_remove_field', + 'migrations.test_operations.OperationTests.test_remove_field_m2m', + 'migrations.test_operations.OperationTests.test_remove_field_m2m_with_through', + 'migrations.test_operations.OperationTests.test_remove_fk', + 'migrations.test_operations.OperationTests.test_remove_index', + 'migrations.test_operations.OperationTests.test_remove_index_state_forwards', + 'migrations.test_operations.OperationTests.test_remove_partial_unique_constraint', + 'migrations.test_operations.OperationTests.test_remove_partial_unique_constraint', + 'migrations.test_operations.OperationTests.test_rename_field', + 'migrations.test_operations.OperationTests.test_rename_field', + 'migrations.test_operations.OperationTests.test_rename_field_reloads_state_on_fk_target_changes', + 'migrations.test_operations.OperationTests.test_rename_field_reloads_state_on_fk_target_changes', + 'migrations.test_operations.OperationTests.test_rename_m2m_model_after_rename_field', + 'migrations.test_operations.OperationTests.test_rename_m2m_model_after_rename_field', + 'migrations.test_operations.OperationTests.test_rename_m2m_target_model', + 'migrations.test_operations.OperationTests.test_rename_m2m_through_model', + 'migrations.test_operations.OperationTests.test_rename_missing_field', + 'migrations.test_operations.OperationTests.test_rename_model', + 'migrations.test_operations.OperationTests.test_rename_model_state_forwards', + 'migrations.test_operations.OperationTests.test_rename_model_with_m2m', + 'migrations.test_operations.OperationTests.test_rename_model_with_self_referential_fk', + 'migrations.test_operations.OperationTests.test_rename_model_with_self_referential_m2m', + 'migrations.test_operations.OperationTests.test_rename_model_with_superclass_fk', + 'migrations.test_operations.OperationTests.test_rename_referenced_field_state_forward', + 'migrations.test_operations.OperationTests.test_repoint_field_m2m', + 'migrations.test_operations.OperationTests.test_run_python', + 'migrations.test_operations.OperationTests.test_run_python_atomic', + 'migrations.test_operations.OperationTests.test_run_python_noop', + 'migrations.test_operations.OperationTests.test_run_python_related_assignment', + 'migrations.test_operations.OperationTests.test_run_sql', + 'migrations.test_operations.OperationTests.test_run_sql_noop', + 'migrations.test_operations.OperationTests.test_run_sql_params', + 'migrations.test_operations.OperationTests.test_run_sql_params', + 'migrations.test_operations.OperationTests.test_run_sql_params_invalid', + 'migrations.test_operations.OperationTests.test_run_sql_params_invalid', + 'migrations.test_operations.OperationTests.test_separate_database_and_state', + 'migrations.test_operations.OperationTests.test_separate_database_and_state2', + 'migrations.test_operations.OperationTests.test_smallfield_autofield_foreignfield_growth', + 'migrations.test_operations.OperationTests.test_smallfield_autofield_foreignfield_growth', + 'migrations.test_operations.OperationTests.test_smallfield_bigautofield_foreignfield_growth', + 'migrations.test_operations.OperationTests.test_smallfield_bigautofield_foreignfield_growth', 'model_fields.test_integerfield.PositiveBigIntegerFieldTests', 'model_fields.test_jsonfield', 'model_indexes.tests.IndexesTests.test_db_tablespace', @@ -110,6 +235,29 @@ 'queries.test_db_returning', 'queries.test_qs_combinators.QuerySetSetOperationTests.test_limits', 'queries.test_qs_combinators.QuerySetSetOperationTests.test_ordering_by_f_expression_and_alias', + 'schema.tests.SchemaTests.test_add_foreign_key_quoted_db_table', + 'schema.tests.SchemaTests.test_alter_auto_field_quoted_db_column', + 'schema.tests.SchemaTests.test_alter_auto_field_to_char_field', + 'schema.tests.SchemaTests.test_alter_auto_field_to_integer_field', + 'schema.tests.SchemaTests.test_alter_autofield_pk_to_bigautofield_pk_sequence_owner', + 'schema.tests.SchemaTests.test_alter_autofield_pk_to_smallautofield_pk_sequence_owner', + 'schema.tests.SchemaTests.test_alter_implicit_id_to_explicit', + 'schema.tests.SchemaTests.test_alter_int_pk_to_autofield_pk', + 'schema.tests.SchemaTests.test_alter_int_pk_to_bigautofield_pk', + 'schema.tests.SchemaTests.test_alter_pk_with_self_referential_field', + 'schema.tests.SchemaTests.test_alter_primary_key_quoted_db_table', + 'schema.tests.SchemaTests.test_alter_smallint_pk_to_smallautofield_pk', + 'schema.tests.SchemaTests.test_char_field_pk_to_auto_field', + 'schema.tests.SchemaTests.test_inline_fk', + 'schema.tests.SchemaTests.test_no_db_constraint_added_during_primary_key_change', + 'schema.tests.SchemaTests.test_remove_field_check_does_not_remove_meta_constraints', + 'schema.tests.SchemaTests.test_remove_field_unique_does_not_remove_meta_constraints', + 'schema.tests.SchemaTests.test_remove_unique_together_does_not_remove_meta_constraints', + 'schema.tests.SchemaTests.test_text_field_with_db_index', + 'schema.tests.SchemaTests.test_unique_and_reverse_m2m', + 'schema.tests.SchemaTests.test_unique_no_unnecessary_fk_drops', + 'schema.tests.SchemaTests.test_unique_together_with_fk', + 'schema.tests.SchemaTests.test_unique_together_with_fk_with_existing_index', 'select_for_update.tests.SelectForUpdateTests.test_for_update_after_from', ) From 2d70cffc5787a1a530af3101b9d8297eb8aad37c Mon Sep 17 00:00:00 2001 From: Oskar Persson Date: Sun, 3 Jan 2021 19:00:33 +0100 Subject: [PATCH 9/9] Exclude migration tests --- test.sh | 2 - testapp/settings.py | 102 -------------------------------------------- 2 files changed, 104 deletions(-) diff --git a/test.sh b/test.sh index 04d20942..b03216d8 100755 --- a/test.sh +++ b/test.sh @@ -77,8 +77,6 @@ python tests/runtests.py --settings=testapp.settings --noinput --keepdb \ many_to_one \ max_lengths \ migrate_signals \ - migration_test_data_persistence \ - migrations \ model_fields \ model_indexes \ model_options \ diff --git a/testapp/settings.py b/testapp/settings.py index e9069d7c..eada7f9f 100644 --- a/testapp/settings.py +++ b/testapp/settings.py @@ -120,108 +120,6 @@ 'introspection.tests.IntrospectionTests.test_smallautofield', 'invalid_models_tests.test_ordinary_fields.TextFieldTests.test_max_length_warning', 'migrate_signals.tests.MigrateSignalTests.test_migrations_only', - 'migration_test_data_persistence.tests.MigrationDataNormalPersistenceTestCase.test_persistence', - 'migration_test_data_persistence.tests.MigrationDataPersistenceTestCase.test_persistence', - 'migrations.test_commands.MigrateTests.test_migrate_syncdb_app_label', - 'migrations.test_commands.MigrateTests.test_migrate_syncdb_deferred_sql_executed_with_schemaeditor', - 'migrations.test_executor.ExecutorTests.test_alter_id_type_with_fk', - 'migrations.test_operations.OperationTests.test_add_constraint_percent_escaping', - 'migrations.test_operations.OperationTests.test_add_deferred_unique_constraint', - 'migrations.test_operations.OperationTests.test_add_partial_unique_constraint', - 'migrations.test_operations.OperationTests.test_alter_field_pk', - 'migrations.test_operations.OperationTests.test_alter_field_pk_fk', - 'migrations.test_operations.OperationTests.test_alter_field_pk_fk', - 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_target_changes', - 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_target_changes', - 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_with_to_field_related_name_target_type_change', - 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_with_to_field_target_changes', - 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_with_to_field_target_changes', - 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_with_to_field_target_type_change', - 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_with_to_field_target_type_change', - 'migrations.test_operations.OperationTests.test_alter_field_with_index', - 'migrations.test_operations.OperationTests.test_alter_field_with_index', - 'migrations.test_operations.OperationTests.test_alter_fk', - 'migrations.test_operations.OperationTests.test_alter_fk_non_fk', - 'migrations.test_operations.OperationTests.test_alter_index_together', - 'migrations.test_operations.OperationTests.test_alter_index_together_remove', - 'migrations.test_operations.OperationTests.test_alter_index_together_remove_with_unique_together', - 'migrations.test_operations.OperationTests.test_alter_model_managers', - 'migrations.test_operations.OperationTests.test_alter_model_managers_emptying', - 'migrations.test_operations.OperationTests.test_alter_model_options', - 'migrations.test_operations.OperationTests.test_alter_model_options_emptying', - 'migrations.test_operations.OperationTests.test_alter_model_table', - 'migrations.test_operations.OperationTests.test_alter_model_table_m2m', - 'migrations.test_operations.OperationTests.test_alter_model_table_none', - 'migrations.test_operations.OperationTests.test_alter_model_table_noop', - 'migrations.test_operations.OperationTests.test_alter_model_table_noop', - 'migrations.test_operations.OperationTests.test_alter_order_with_respect_to', - 'migrations.test_operations.OperationTests.test_alter_unique_together', - 'migrations.test_operations.OperationTests.test_alter_unique_together_remove', - 'migrations.test_operations.OperationTests.test_autofield__bigautofield_foreignfield_growth', - 'migrations.test_operations.OperationTests.test_autofield__bigautofield_foreignfield_growth', - 'migrations.test_operations.OperationTests.test_column_name_quoting', - 'migrations.test_operations.OperationTests.test_create_model', - 'migrations.test_operations.OperationTests.test_create_model_inheritance', - 'migrations.test_operations.OperationTests.test_create_model_m2m', - 'migrations.test_operations.OperationTests.test_create_model_managers', - 'migrations.test_operations.OperationTests.test_create_model_with_constraint', - 'migrations.test_operations.OperationTests.test_create_model_with_deferred_unique_constraint', - 'migrations.test_operations.OperationTests.test_create_model_with_duplicate_base', - 'migrations.test_operations.OperationTests.test_create_model_with_duplicate_field_name', - 'migrations.test_operations.OperationTests.test_create_model_with_duplicate_manager_name', - 'migrations.test_operations.OperationTests.test_create_model_with_partial_unique_constraint', - 'migrations.test_operations.OperationTests.test_create_model_with_partial_unique_constraint', - 'migrations.test_operations.OperationTests.test_create_model_with_unique_after', - 'migrations.test_operations.OperationTests.test_create_proxy_model', - 'migrations.test_operations.OperationTests.test_create_unmanaged_model', - 'migrations.test_operations.OperationTests.test_delete_model', - 'migrations.test_operations.OperationTests.test_delete_mti_model', - 'migrations.test_operations.OperationTests.test_delete_proxy_model', - 'migrations.test_operations.OperationTests.test_model_with_bigautofield', - 'migrations.test_operations.OperationTests.test_remove_constraint', - 'migrations.test_operations.OperationTests.test_remove_deferred_unique_constraint', - 'migrations.test_operations.OperationTests.test_remove_deferred_unique_constraint', - 'migrations.test_operations.OperationTests.test_remove_field', - 'migrations.test_operations.OperationTests.test_remove_field_m2m', - 'migrations.test_operations.OperationTests.test_remove_field_m2m_with_through', - 'migrations.test_operations.OperationTests.test_remove_fk', - 'migrations.test_operations.OperationTests.test_remove_index', - 'migrations.test_operations.OperationTests.test_remove_index_state_forwards', - 'migrations.test_operations.OperationTests.test_remove_partial_unique_constraint', - 'migrations.test_operations.OperationTests.test_remove_partial_unique_constraint', - 'migrations.test_operations.OperationTests.test_rename_field', - 'migrations.test_operations.OperationTests.test_rename_field', - 'migrations.test_operations.OperationTests.test_rename_field_reloads_state_on_fk_target_changes', - 'migrations.test_operations.OperationTests.test_rename_field_reloads_state_on_fk_target_changes', - 'migrations.test_operations.OperationTests.test_rename_m2m_model_after_rename_field', - 'migrations.test_operations.OperationTests.test_rename_m2m_model_after_rename_field', - 'migrations.test_operations.OperationTests.test_rename_m2m_target_model', - 'migrations.test_operations.OperationTests.test_rename_m2m_through_model', - 'migrations.test_operations.OperationTests.test_rename_missing_field', - 'migrations.test_operations.OperationTests.test_rename_model', - 'migrations.test_operations.OperationTests.test_rename_model_state_forwards', - 'migrations.test_operations.OperationTests.test_rename_model_with_m2m', - 'migrations.test_operations.OperationTests.test_rename_model_with_self_referential_fk', - 'migrations.test_operations.OperationTests.test_rename_model_with_self_referential_m2m', - 'migrations.test_operations.OperationTests.test_rename_model_with_superclass_fk', - 'migrations.test_operations.OperationTests.test_rename_referenced_field_state_forward', - 'migrations.test_operations.OperationTests.test_repoint_field_m2m', - 'migrations.test_operations.OperationTests.test_run_python', - 'migrations.test_operations.OperationTests.test_run_python_atomic', - 'migrations.test_operations.OperationTests.test_run_python_noop', - 'migrations.test_operations.OperationTests.test_run_python_related_assignment', - 'migrations.test_operations.OperationTests.test_run_sql', - 'migrations.test_operations.OperationTests.test_run_sql_noop', - 'migrations.test_operations.OperationTests.test_run_sql_params', - 'migrations.test_operations.OperationTests.test_run_sql_params', - 'migrations.test_operations.OperationTests.test_run_sql_params_invalid', - 'migrations.test_operations.OperationTests.test_run_sql_params_invalid', - 'migrations.test_operations.OperationTests.test_separate_database_and_state', - 'migrations.test_operations.OperationTests.test_separate_database_and_state2', - 'migrations.test_operations.OperationTests.test_smallfield_autofield_foreignfield_growth', - 'migrations.test_operations.OperationTests.test_smallfield_autofield_foreignfield_growth', - 'migrations.test_operations.OperationTests.test_smallfield_bigautofield_foreignfield_growth', - 'migrations.test_operations.OperationTests.test_smallfield_bigautofield_foreignfield_growth', 'model_fields.test_integerfield.PositiveBigIntegerFieldTests', 'model_fields.test_jsonfield', 'model_indexes.tests.IndexesTests.test_db_tablespace',