1
0
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:
Tim Graham
2017-05-04 10:14:35 -04:00
parent c679ac0449
commit 444cdf6131
27 changed files with 31 additions and 91 deletions

View File

@@ -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']