Opened 14 years ago
Last modified 14 years ago
#14439 closed
Running the GIS testsuite is very hard. — at Version 2
Reported by: | Luke Plant | Owned by: | nobody |
---|---|---|---|
Component: | GIS | Version: | 1.2 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
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.
Change History (2)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Description: | modified (diff) |
---|
I've tried installing PostGIS, and using the 'postgresql_psycopg2' backend, but having the same problem.