#10832 closed (fixed)
GIS test runner (run_tests) should reorder test suite like django.test.simple.run_tests
Reported by: | Sean Legassick | Owned by: | jbronn |
---|---|---|---|
Component: | GIS | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The GIS test runner should re-order tests so that django.test.testcases.TestCase subclasses come first, and other TestCase subclasses afterwards. These deals with an issue where TransactionTestCase tests that don't clean up the database before finishing can interfere with the correct running of TestCase tests. The attached patch uses the reorder_tests function from the django.tests.simple module in the same way as django.tests.simple.run_tests.
Attachments (1)
Change History (6)
by , 16 years ago
Attachment: | 10832-gis-test-runner-reorders-test-suite.diff added |
---|
follow-up: 3 comment:1 by , 16 years ago
milestone: | → 1.1 |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 16 years ago
Gis actually has two test runners, one (run_gis_tests) used to test the gis codebase itself, another (run_tests) for use by external GIS-enabled projects in order to run their own tests (there is some extra setup of the test DB required to enable GIS functionality). It's the former that has particular ordering requirements to prevent segfaults, whereas my patch only affects the latter.
However I agree that it would be good to get Justin or another GIS core dev to verify that this is an appropriate change.
comment:3 by , 16 years ago
Owner: | changed from | to
---|
Replying to kmtracey:
Particularly as there are apparently already some ordering requirements for gis testing in order to avoid segfaults...hopefully moving the TestCase tests to the front do not conflict with that?
That segfault-prevention ordering was only needed when using the SpatiaLite 2.3 beta version. Fortunately, the 2.3 stable release and recent improvements in the way GeoDjango retrieves SRID information have made this ordering requirement moot, and I'll remove it when I patch this ticket.
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I think the patch is correct but someone who knows something about gis (I did not even realize it had its own test runner) should verify. Particularly as there are apparently already some ordering requirements for gis testing in order to avoid segfaults...hopefully moving the TestCase tests to the front do not conflict with that?