summaryrefslogtreecommitdiff
path: root/tests/gis_tests/geogapp
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2021-04-03 16:23:19 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-04-08 09:36:29 +0200
commit30e123ed351317b7527f632b3b7dc4e81e850449 (patch)
tree4294ff86fa9235ea8c09208fdbecd0f7a1319993 /tests/gis_tests/geogapp
parentb9d156761f459c889d0c51e6d421d29d8a2f8ae6 (diff)
downloaddjango-30e123ed351317b7527f632b3b7dc4e81e850449.tar.gz
Fixed #32575 -- Added support for SpatiaLite 5.
Diffstat (limited to 'tests/gis_tests/geogapp')
-rw-r--r--tests/gis_tests/geogapp/tests.py9
1 files changed, 6 insertions, 3 deletions
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')