Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

gis: Fixed #5437 with patch from rcoup.

git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit d1d5cf7aa266cc04592e5f122563ae6315870050 1 parent 57135b1
@jbronn jbronn authored
Showing with 17 additions and 8 deletions.
  1. +17 −8 django/contrib/gis/tests/__init__.py
View
25 django/contrib/gis/tests/__init__.py
@@ -1,15 +1,24 @@
from copy import copy
from unittest import TestSuite, TextTestRunner
+import sys
# Tests that do not require setting up and tearing down a spatial database.
-test_suite_names = ['test_gdal_driver',
- 'test_gdal_ds',
- 'test_gdal_geom',
- 'test_gdal_srs',
- 'test_geos',
- 'test_measure',
- 'test_spatialrefsys',
- ]
+test_suite_names = [
+ 'test_geos',
+ 'test_measure',
+]
+try:
+ # GDAL tests
+ import django.contrib.gis.gdal
+ test_suite_names += [
+ 'test_gdal_driver',
+ 'test_gdal_ds',
+ 'test_gdal_geom',
+ 'test_gdal_srs',
+ 'test_spatialrefsys',
+ ]
+except ImportError, e:
+ print >>sys.stderr, "GDAL not available - no GDAL tests will be run."
test_models = ['geoapp']
Please sign in to comment.
Something went wrong with that request. Please try again.