From 30e123ed351317b7527f632b3b7dc4e81e850449 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sat, 3 Apr 2021 16:23:19 +0200 Subject: Fixed #32575 -- Added support for SpatiaLite 5. --- tests/gis_tests/geogapp/tests.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tests/gis_tests/geogapp') diff --git a/tests/gis_tests/geogapp/tests.py b/tests/gis_tests/geogapp/tests.py index 53852517e8..7f465f5753 100644 --- a/tests/gis_tests/geogapp/tests.py +++ b/tests/gis_tests/geogapp/tests.py @@ -111,9 +111,12 @@ class GeographyFunctionTests(FuncTestMixin, TestCase): if connection.ops.oracle: ref_dists = [0, 4899.68, 8081.30, 9115.15] elif connection.ops.spatialite: - # SpatiaLite returns non-zero distance for polygons and points - # covered by that polygon. - ref_dists = [326.61, 4899.68, 8081.30, 9115.15] + if connection.ops.spatial_version < (5,): + # SpatiaLite < 5 returns non-zero distance for polygons and points + # covered by that polygon. + ref_dists = [326.61, 4899.68, 8081.30, 9115.15] + else: + ref_dists = [0, 4899.68, 8081.30, 9115.15] else: ref_dists = [0, 4891.20, 8071.64, 9123.95] htown = City.objects.get(name='Houston') -- cgit v1.2.1