Opened 8 years ago

Closed 18 months ago

#5437 closed Bug (wontfix)

Make GDAL optional for GIS test runner

Reported by: rcoup Owned by: vlal
Component: GIS Version: master
Severity: Normal Keywords: testing
Cc: vlal Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


In a similar vein to #5433, its pretty easy to make GDAL optional for the GIS test runner.

Attached patch prints a message to stderr if GDAL can't be imported, and continues with the other tests.

Attachments (1)

tests_remove_gdal_dep.patch (1.1 KB) - added by rcoup 8 years ago.

Download all attachments as: .zip

Change History (11)

Changed 8 years ago by rcoup

comment:1 Changed 8 years ago by adrian

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Version changed from SVN to gis

comment:2 Changed 8 years ago by jbronn

  • Resolution set to fixed
  • Status changed from new to closed

(In [6240]) gis: Fixed #5437 with patch from rcoup.

comment:3 Changed 23 months ago by shai

  • Easy pickings unset
  • Keywords testing added; sprint removed
  • Resolution fixed deleted
  • Severity set to Normal
  • Status changed from closed to new
  • Type set to Bug
  • UI/UX unset
  • Version changed from gis to master

This has apparently made a comeback; when running the tests without GDAL on master now, I get:

Importing application geoadmin
Traceback (most recent call last):
  File "", line 379, in <module>
    options.failfast, args)
  File "", line 198, in django_tests
    state = setup(verbosity, test_labels)
  File "", line 172, in setup
  File ".../django/apps/", line 160, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python2.7/importlib/", line 37, in import_module
  File ".../django/contrib/gis/tests/geoadmin/", line 19, in <module>, admin.OSMGeoAdmin)
AttributeError: 'module' object has no attribute 'OSMGeoAdmin'

OSMGeoAdmin requires GDAL, and it is used unconditionally in a test.

As far as I could see, this goes back to the introduction of the geoadmin/ file, back in September 2011, so although it is a regression, it has probably been this way since 1.4. On one hand, this means it is not a release blocker; on the other hand, this probably justifies backporting the fix to all the live versions.

comment:4 Changed 21 months ago by Alex

  • Triage Stage changed from Unreviewed to Accepted

comment:5 Changed 20 months ago by vlal

Issued Pull Request #5437. Verified tests either pass or skip when necessary.

comment:6 Changed 20 months ago by vlal

  • Owner changed from nobody to vlal
  • Status changed from new to assigned

comment:7 Changed 20 months ago by claudep

Thanks for the patch. But frankly, when I see that, I'm really tempted to make GDAL a required part of our GIS infrastructure. I think that in the past, GDAL was not so easily installable, but that limitation may be moot now. It might be worth debating this on django-dev mailing list.

comment:8 Changed 19 months ago by vlal

  • Cc vlal added

comment:9 Changed 19 months ago by vlal

Posted on django-dev mailing list here

comment:10 Changed 18 months ago by timo

  • Resolution set to wontfix
  • Status changed from assigned to closed

Given the lack of interest, I'm going to close this as "won't fix."

Note: See TracTickets for help on using tickets.
Back to Top