mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #32575 -- Added support for SpatiaLite 5.
This commit is contained in:
committed by
Mariusz Felisiak
parent
b9d156761f
commit
30e123ed35
@@ -367,16 +367,12 @@ class DistanceFunctionsTests(FuncTestMixin, TestCase):
|
||||
dist2 = SouthTexasCityFt.objects.annotate(distance=Distance('point', lagrange)).order_by('id')
|
||||
dist_qs = [dist1, dist2]
|
||||
|
||||
# Original query done on PostGIS, have to adjust AlmostEqual tolerance
|
||||
# for Oracle.
|
||||
tol = 2 if connection.ops.oracle else 5
|
||||
|
||||
# Ensuring expected distances are returned for each distance queryset.
|
||||
for qs in dist_qs:
|
||||
for i, c in enumerate(qs):
|
||||
with self.subTest(c=c):
|
||||
self.assertAlmostEqual(m_distances[i], c.distance.m, tol)
|
||||
self.assertAlmostEqual(ft_distances[i], c.distance.survey_ft, tol)
|
||||
self.assertAlmostEqual(m_distances[i], c.distance.m, -1)
|
||||
self.assertAlmostEqual(ft_distances[i], c.distance.survey_ft, -1)
|
||||
|
||||
@skipUnlessDBFeature("has_Distance_function", "supports_distance_geodetic")
|
||||
def test_distance_geodetic(self):
|
||||
|
||||
Reference in New Issue
Block a user