﻿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
14439	Improve documentation on how to run the GIS test suite	Luke Plant	nobody	"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.
"		closed	GIS	1.2		fixed			Accepted	0	0	0	0	0	0
