mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	[2.2.x] Fixed a failure when running tests on systems with SQLite < 3.8.3.
Backport of 36300ef336 from master.
			
			
This commit is contained in:
		| @@ -6,7 +6,6 @@ from unittest import mock | |||||||
|  |  | ||||||
| from django.core.exceptions import ImproperlyConfigured | from django.core.exceptions import ImproperlyConfigured | ||||||
| from django.db import connection, transaction | 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 import Avg, StdDev, Sum, Variance | ||||||
| from django.db.models.aggregates import Aggregate | from django.db.models.aggregates import Aggregate | ||||||
| from django.db.models.fields import CharField | 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 | 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') | @unittest.skipUnless(connection.vendor == 'sqlite', 'SQLite tests') | ||||||
| class Tests(TestCase): | class Tests(TestCase): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user