Opened 10 years ago
Closed 10 years ago
#24802 closed Cleanup/optimization (fixed)
gis_tests.geoadmin.tests fails
Reported by: | Arfrever | Owned by: | nobody |
---|---|---|---|
Component: | GIS | Version: | 1.8 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Django 1.8.1.
GDAL not installed.
Output of test suite:
$ PYTHONPATH="." python2.7 tests/runtests.py Testing against Django installed in '/tmp/Django-1.8.1/django' Creating test database for alias 'default'... Creating test database for alias 'other'... ... ====================================================================== ERROR: gis_tests.geoadmin.tests (unittest.loader.ModuleImportFailure) ---------------------------------------------------------------------- ImportError: Failed to import test module: gis_tests.geoadmin.tests Traceback (most recent call last): File "/usr/lib64/python2.7/unittest/loader.py", line 254, in _find_tests module = self._get_module_from_name(name) File "/usr/lib64/python2.7/unittest/loader.py", line 232, in _get_module_from_name __import__(name) File "/tmp/Django-1.8.1/tests/gis_tests/geoadmin/tests.py", line 10, in <module> from .admin import UnmodifiableAdmin File "/tmp/Django-1.8.1/tests/gis_tests/geoadmin/admin.py", line 4, in <module> class UnmodifiableAdmin(admin.OSMGeoAdmin): AttributeError: 'module' object has no attribute 'OSMGeoAdmin' ---------------------------------------------------------------------- Ran 9250 tests in 678.819s FAILED (errors=1, skipped=475, expected failures=8) Destroying test database for alias 'default'... Destroying test database for alias 'other'...
Change History (6)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Easy pickings: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
In master, this is fixed by [d9bcba9b29725a3b717846db651bf917630610ff].
comment:3 by , 10 years ago
GEOS happens to be installed.
Backporting of a37dcfd0a38cff24eb4fb5e3858791aa5428c853 allows tests to pass.
comment:4 by , 10 years ago
Easy pickings: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Claude, I think backporting a37dcfd0a38cff24eb4fb5e3858791aa5428c853 would be fine; any concern from you? By the way, I would have kept the __all___
in django/contrib/gis/admin/__init__.py
so we could get rid of the # NOQA comments beside each import.
It seems as if you have GEOS installed, but not GDAL? The OSMGeoAdmin only exists if HAS_GDAL=True so it seems the conditional imports are not quite correct. Any chance you could submit a patch that works on your system?
I'd also be interested to know if you have any problems on master as the tests have been somewhat refactored there.