diff options
| author | Tim Graham <timograham@gmail.com> | 2019-02-21 12:50:33 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2019-02-21 16:39:42 -0500 |
| commit | 9a5f87a69cba85a3192baf5cd504a1594793b5a7 (patch) | |
| tree | 2fdc485cb171faf2348e44684483bbddc493c5ae | |
| parent | a9bd914a22df3adfb25141e01b4b409609c0306c (diff) | |
[2.2.x] Fixed a failure when running tests on systems with SQLite < 3.8.3.
Backport of 36300ef336e3f130a0dadc1143163ff3d23dc843 from master.
| -rw-r--r-- | tests/backends/sqlite/tests.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/backends/sqlite/tests.py b/tests/backends/sqlite/tests.py index e53d453ed5..21be45fb11 100644 --- a/tests/backends/sqlite/tests.py +++ b/tests/backends/sqlite/tests.py @@ -6,7 +6,6 @@ from unittest import mock from django.core.exceptions import ImproperlyConfigured from django.db import connection, transaction -from django.db.backends.sqlite3.base import check_sqlite_version from django.db.models import Avg, StdDev, Sum, Variance from django.db.models.aggregates import Aggregate from django.db.models.fields import CharField @@ -18,6 +17,12 @@ from django.test.utils import isolate_apps from ..models import Author, Item, Object, Square +try: + from django.db.backends.sqlite3.base import check_sqlite_version +except ImproperlyConfigured: + # Ignore "SQLite is too old" when running tests on another database. + pass + @unittest.skipUnless(connection.vendor == 'sqlite', 'SQLite tests') class Tests(TestCase): |
