mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[1.11.x] Made runtests.py run gis_tests only when using a GIS database backend.
This facilitates other changes like refs #28160.
Backport of 890537253c from master
This commit is contained in:
@@ -14,15 +14,13 @@ from django.test import (
|
||||
|
||||
from ..utils import mysql, spatialite
|
||||
|
||||
if connection.features.gis_enabled:
|
||||
try:
|
||||
GeometryColumns = connection.ops.geometry_columns()
|
||||
HAS_GEOMETRY_COLUMNS = True
|
||||
except NotImplementedError:
|
||||
HAS_GEOMETRY_COLUMNS = False
|
||||
try:
|
||||
GeometryColumns = connection.ops.geometry_columns()
|
||||
HAS_GEOMETRY_COLUMNS = True
|
||||
except NotImplementedError:
|
||||
HAS_GEOMETRY_COLUMNS = False
|
||||
|
||||
|
||||
@skipUnlessDBFeature('gis_enabled')
|
||||
class OperationTestCase(TransactionTestCase):
|
||||
available_apps = ['gis_tests.gis_migrations']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user