#14439: Running the GIS testsuite is very hard. ---------------------------------+------------------------------------------ Reporter: lukeplant | Owner: nobody Status: new | Milestone: Component: GIS | Version: 1.2 Resolution: | Keywords: Stage: Unreviewed | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ---------------------------------+------------------------------------------ Old description:
> Starting small, I'm attempting to use Spatialite to run the GIS testsuite > (or at least the relevant parts), just because I need to run the GIS > tests as a core developer. > > First, the docs for this are very sketchy - the only thing I can find is > this: > {{{ > To run GeoDjango's own internal test suite, configure the TEST_RUNNER > setting as follows: > > TEST_RUNNER='django.contrib.gis.tests.run_gis_tests' > }}} > > Doing this in the obvious place (runtests.py), produces this: > > {{{ > Traceback (most recent call last): > File "./runtests.py", line 314, in <module> > failures = django_tests(int(options.verbosity), options.interactive, > options.failfast, args) > File "./runtests.py", line 180, in django_tests > extra_tests=extra_tests) > File > "/home/luke/devel/django/trunk/django/contrib/gis/tests/__init__.py", > line 19, in run_gis_tests > return test_runner.run_tests(test_labels, extra_tests=extra_tests) > File "/home/luke/devel/django/trunk/django/test/simple.py", line 311, > in run_tests > self.setup_test_environment() > File > "/home/luke/devel/django/trunk/django/contrib/gis/tests/__init__.py", > line 37, in setup_test_environment > if connection.ops.postgis and connection.ops.geography: > AttributeError: 'DatabaseOperations' object has no attribute 'postgis' > }}} > Also #10420 about this. > > Using a test project and `./manage.py test` instead, I get the following: > {{{ > > Traceback (most recent call last): > File "./manage.py", line 11, in <module> > execute_manager(settings) > File > "/home/luke/devel/django/trunk/django/core/management/__init__.py", line > 438, in execute_manager > utility.execute() > File > "/home/luke/devel/django/trunk/django/core/management/__init__.py", line > 379, in execute > self.fetch_command(subcommand).run_from_argv(self.argv) > File "/home/luke/devel/django/trunk/django/core/management/base.py", > line 191, in run_from_argv > self.execute(*args, **options.__dict__) > File "/home/luke/devel/django/trunk/django/core/management/base.py", > line 220, in execute > output = self.handle(*args, **options) > File > "/home/luke/devel/django/trunk/django/core/management/commands/test.py", > line 34, in handle > failures = TestRunner(test_labels, verbosity=verbosity, > interactive=interactive) > File > "/home/luke/devel/django/trunk/django/contrib/gis/tests/__init__.py", > line 19, in run_gis_tests > return test_runner.run_tests(test_labels, extra_tests=extra_tests) > File "/home/luke/devel/django/trunk/django/test/simple.py", line 311, > in run_tests > self.setup_test_environment() > File > "/home/luke/devel/django/trunk/django/contrib/gis/tests/__init__.py", > line 37, in setup_test_environment > if connection.ops.postgis and connection.ops.geography: > AttributeError: 'DatabaseOperations' object has no attribute 'postgis' > }}} > > I do have `init_spatialite-2.3.sql` in the working directory, not sure if > that is needed. New description: Starting small, I'm attempting to use Spatialite to run the GIS testsuite (or at least the relevant parts), just because I need to run the GIS tests as a core developer. First, the docs for this are very sketchy - the only thing I can find is this: {{{ To run GeoDjango's own internal test suite, configure the TEST_RUNNER setting as follows: TEST_RUNNER='django.contrib.gis.tests.run_gis_tests' }}} Doing this in the obvious place i.e. a settings file and using runtests.py, produces this: {{{ Traceback (most recent call last): File "./runtests.py", line 314, in <module> failures = django_tests(int(options.verbosity), options.interactive, options.failfast, args) File "./runtests.py", line 180, in django_tests extra_tests=extra_tests) File "/home/luke/devel/django/trunk/django/contrib/gis/tests/__init__.py", line 19, in run_gis_tests return test_runner.run_tests(test_labels, extra_tests=extra_tests) File "/home/luke/devel/django/trunk/django/test/simple.py", line 311, in run_tests self.setup_test_environment() File "/home/luke/devel/django/trunk/django/contrib/gis/tests/__init__.py", line 37, in setup_test_environment if connection.ops.postgis and connection.ops.geography: AttributeError: 'DatabaseOperations' object has no attribute 'postgis' }}} Also #10420 about this. Using a test project and `./manage.py test` instead, I get the following: {{{ Traceback (most recent call last): File "./manage.py", line 11, in <module> execute_manager(settings) File "/home/luke/devel/django/trunk/django/core/management/__init__.py", line 438, in execute_manager utility.execute() File "/home/luke/devel/django/trunk/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/luke/devel/django/trunk/django/core/management/base.py", line 191, in run_from_argv self.execute(*args, **options.__dict__) File "/home/luke/devel/django/trunk/django/core/management/base.py", line 220, in execute output = self.handle(*args, **options) File "/home/luke/devel/django/trunk/django/core/management/commands/test.py", line 34, in handle failures = TestRunner(test_labels, verbosity=verbosity, interactive=interactive) File "/home/luke/devel/django/trunk/django/contrib/gis/tests/__init__.py", line 19, in run_gis_tests return test_runner.run_tests(test_labels, extra_tests=extra_tests) File "/home/luke/devel/django/trunk/django/test/simple.py", line 311, in run_tests self.setup_test_environment() File "/home/luke/devel/django/trunk/django/contrib/gis/tests/__init__.py", line 37, in setup_test_environment if connection.ops.postgis and connection.ops.geography: AttributeError: 'DatabaseOperations' object has no attribute 'postgis' }}} I do have `init_spatialite-2.3.sql` in the working directory, not sure if that is needed. -- Ticket URL: <http://code.djangoproject.com/ticket/14439#comment:2> 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 django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.