From 51806359dbc346ee399eb94894cb49cf0ad85ef5 Mon Sep 17 00:00:00 2001 From: David Smith Date: Thu, 11 Jan 2024 18:17:20 +0000 Subject: [PATCH] Fixed test_unionagg_tolerance with Oracle 23c+. --- tests/gis_tests/geoapp/tests.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/gis_tests/geoapp/tests.py b/tests/gis_tests/geoapp/tests.py index 7ee47ee9a8..c6eeb029e5 100644 --- a/tests/gis_tests/geoapp/tests.py +++ b/tests/gis_tests/geoapp/tests.py @@ -711,10 +711,16 @@ class GeoQuerySetTest(TestCase): tx = Country.objects.get(name="Texas").mpoly # Tolerance is greater than distance between Forney and Dallas, that's # why Dallas is ignored. - forney_houston = GEOSGeometry( - "MULTIPOINT(-95.363151 29.763374, -96.467222 32.751389)", - srid=4326, - ) + if connection.ops.oracle and connection.oracle_version >= (23,): + forney_houston = GEOSGeometry( + "MULTIPOINT (-95.363151 29.763374, -96.801611 32.782057)", + srid=4326, + ) + else: + forney_houston = GEOSGeometry( + "MULTIPOINT(-95.363151 29.763374, -96.467222 32.751389)", + srid=4326, + ) self.assertIs( forney_houston.equals_exact( City.objects.filter(point__within=tx).aggregate(