Opened 17 years ago
Closed 10 years ago
#5437 closed Bug (wontfix)
Make GDAL optional for GIS test runner
Reported by: | Robert Coup | Owned by: | Vishal Lal |
---|---|---|---|
Component: | GIS | Version: | dev |
Severity: | Normal | Keywords: | testing |
Cc: | Vishal Lal | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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)
Change History (11)
by , 17 years ago
Attachment: | tests_remove_gdal_dep.patch added |
---|
comment:1 by , 17 years ago
Version: | SVN → gis |
---|
comment:2 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 11 years ago
Easy pickings: | unset |
---|---|
Keywords: | testing added; sprint removed |
Resolution: | fixed |
Severity: | → Normal |
Status: | closed → new |
Type: | → Bug |
UI/UX: | unset |
Version: | gis → 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 "runtests.py", line 379, in <module> options.failfast, args) File "runtests.py", line 198, in django_tests state = setup(verbosity, test_labels) File "runtests.py", line 172, in setup app_config.import_models(apps.all_models[app_config.label]) File ".../django/apps/base.py", line 160, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File ".../django/contrib/gis/tests/geoadmin/models.py", line 19, in <module> admin.site.register(City, 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/models.py
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 by , 11 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:5 by , 11 years ago
Issued Pull Request #5437. Verified tests either pass or skip when necessary.
comment:6 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:7 by , 11 years ago
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 by , 11 years ago
Cc: | added |
---|
comment:10 by , 10 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
Given the lack of interest, I'm going to close this as "won't fix."
(In [6240]) gis: Fixed #5437 with patch from rcoup.