Ticket #5437: tests_remove_gdal_dep.patch

File tests_remove_gdal_dep.patch, 1.1 KB (added by Robert Coup, 17 years ago)
  • django/contrib/gis/tests/__init__.py

     
    11from copy import copy
    22from unittest import TestSuite, TextTestRunner
     3import sys
    34
    45# Tests that do not require setting up and tearing down a spatial database.
    5 test_suite_names = ['test_gdal_driver',
    6                     'test_gdal_ds',
    7                     'test_gdal_geom',
    8                     'test_gdal_srs',
    9                     'test_geos',
    10                     'test_measure',
    11                     'test_spatialrefsys',
    12                     ]
     6test_suite_names = [
     7    'test_geos',
     8    'test_measure',
     9]
     10try:
     11    # GDAL tests
     12    import django.contrib.gis.gdal
     13    test_suite_names += [
     14        'test_gdal_driver',
     15        'test_gdal_ds',
     16        'test_gdal_geom',
     17        'test_gdal_srs',
     18        'test_spatialrefsys',
     19    ]
     20except ImportError, e:
     21    print >>sys.stderr, "GDAL not available - no GDAL tests will be run."
    1322
    1423test_models = ['geoapp']
Back to Top