id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 10420,Running gis tests via runtests doesn't work.,Malcolm Tredinnick,jbronn,"In r9918, we added the facility to use `TEST_RUNNER` for Django's standard `runtests.py` path. I naïvely tried to use that today and the wheels fell off in an interesting fashion. The settings file was: {{{ #!python DATABASE_ENGINE = 'postgresql_psycopg2' DATABASE_NAME = 'django' TEST_RUNNER = 'django.contrib.gis.tests.run_gis_tests' POSTGIS_TEMPLATE = 'template_postgis' }}} and then I invoked {{{ ./runtests.py --settings=settings7 gis }}} and was handed {{{ Traceback (most recent call last): File ""./runtests.py"", line 187, in django_tests(int(options.verbosity), options.interactive, args) File ""./runtests.py"", line 157, in django_tests failures = test_runner(test_labels, verbosity=verbosity, interactive=interactive, extra_tests=extra_tests) File ""/usr/lib/python2.5/site-packages/django/contrib/gis/tests/__init__.py"", line 88, in run_gis_tests gis_suite, test_models = geo_suite() File ""/usr/lib/python2.5/site-packages/django/contrib/gis/tests/__init__.py"", line 50, in geo_suite tsuite = getattr(__import__('django.contrib.gis.tests', globals(), locals(), [test_suite]),test_suite) File ""/usr/lib/python2.5/site-packages/django/contrib/gis/tests/test_spatialrefsys.py"", line 4, in from django.contrib.gis.models import SpatialRefSys ImportError: cannot import name SpatialRefSys }}} Something's going wonky in the import stuff in `get_suite()`, but I can't figure it out yet. Would be nice if this more or less just worked at some point, though. This isn't a regression, by the way, since, previously, no tests would be run at all, as `runtests.py` wouldn't use the gis test runner. So it's an enhancement to make this work. Also, it might well be made easier once we land #8193.",,closed,GIS,dev,,fixed,,,Accepted,0,0,0,0,0,0