Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #10832 -- now use `reorder_suite` in GeoDjango test runner, tha…

…nks seanl for ticket & patch; restored original ordering of GEOS tests, as placing last no longer necessary.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent aeaba06 commit be11bd40d417331944a2fbf6f2d7b4e2e72680cf @jbronn jbronn committed
Showing with 7 additions and 8 deletions.
  1. +7 −8 django/contrib/gis/tests/
15 django/contrib/gis/tests/
@@ -1,4 +1,5 @@
import sys, unittest
+from django.test.simple import reorder_suite, TestCase
from django.utils.importlib import import_module
def geo_suite():
@@ -16,6 +17,10 @@ def geo_suite():
# The test suite.
s = unittest.TestSuite()
+ # Adding the GEOS tests.
+ from django.contrib.gis.geos import tests as geos_tests
+ s.addTest(geos_tests.suite())
# Tests that require use of a spatial database (e.g., creation of models)
test_apps = ['geoapp', 'relatedapp']
@@ -48,14 +53,6 @@ def geo_suite():
tsuite = import_module('django.contrib.gis.tests.' + suite_name)
- # Adding the GEOS tests _last_. Doing this because if suite starts
- # immediately with this test while after running syncdb, it will cause a
- # segmentation fault. My initial guess is that SpatiaLite is still in
- # critical areas of non thread-safe GEOS code when the test suite is run.
- # TODO: Confirm my reasoning. Are there other consequences?
- from django.contrib.gis.geos import tests as geos_tests
- s.addTest(geos_tests.suite())
return s, test_apps
def run_gis_tests(test_labels, **kwargs):
@@ -158,6 +155,8 @@ def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=[], suite=
for test in extra_tests:
+ suite = reorder_suite(suite, (TestCase,))
# Executing the tests (including the model tests), and destorying the
# test database after the tests have completed.
result = unittest.TextTestRunner(verbosity=verbosity).run(suite)

0 comments on commit be11bd4

Please sign in to comment.
Something went wrong with that request. Please try again.