diff options
| author | Hasan Ramezani <hasan.r67@gmail.com> | 2020-12-10 18:00:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-10 18:00:57 +0100 |
| commit | 275dd4ebbabbbe758c7219a3d666953d5a7b072f (patch) | |
| tree | d0534f7047f9ba43525368eda2c121df54801d4c /django/db/backends/sqlite3/features.py | |
| parent | 5ce31d6a7142ca8c76d6b52fa42b3406b9a8ff48 (diff) | |
Fixed #32178 -- Allowed database backends to skip tests and mark expected failures.
Co-authored-by: Tim Graham <timograham@gmail.com>
Diffstat (limited to 'django/db/backends/sqlite3/features.py')
| -rw-r--r-- | django/db/backends/sqlite3/features.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/django/db/backends/sqlite3/features.py b/django/db/backends/sqlite3/features.py index 880d2e50dd..3348256c74 100644 --- a/django/db/backends/sqlite3/features.py +++ b/django/db/backends/sqlite3/features.py @@ -51,6 +51,37 @@ class DatabaseFeatures(BaseDatabaseFeatures): } @cached_property + def django_test_skips(self): + skips = { + 'SQLite stores values rounded to 15 significant digits.': { + 'model_fields.test_decimalfield.DecimalFieldTests.test_fetch_from_db_without_float_rounding', + }, + 'SQLite naively remakes the table on field alteration.': { + 'schema.tests.SchemaTests.test_unique_no_unnecessary_fk_drops', + 'schema.tests.SchemaTests.test_unique_and_reverse_m2m', + 'schema.tests.SchemaTests.test_alter_field_default_doesnt_perform_queries', + 'schema.tests.SchemaTests.test_rename_column_renames_deferred_sql_references', + }, + "SQLite doesn't have a constraint.": { + 'model_fields.test_integerfield.PositiveIntegerFieldTests.test_negative_values', + }, + } + if Database.sqlite_version_info < (3, 27): + skips.update({ + 'Nondeterministic failure on SQLite < 3.27.': { + 'expressions_window.tests.WindowFunctionTests.test_subquery_row_range_rank', + }, + }) + if self.connection.is_in_memory_db(): + skips.update({ + "the sqlite backend's close() method is a no-op when using an " + "in-memory database": { + 'servers.test_liveserverthread.LiveServerThreadTest.test_closes_connections', + }, + }) + return skips + + @cached_property def supports_atomic_references_rename(self): # SQLite 3.28.0 bundled with MacOS 10.15 does not support renaming # references atomically. |
