#10420: Running gis tests via runtests doesn't work.
-------------------------+--------------------------------------------------
 Reporter:  mtredinnick  |       Owner:  nobody    
   Status:  new          |   Milestone:            
Component:  GIS          |     Version:  SVN       
 Keywords:               |       Stage:  Unreviewed
Has_patch:  0            |  
-------------------------+--------------------------------------------------
 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 <module>
     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
 <module>
     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.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10420>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to