From d0113c17119a1946a49f2160375997eeb9cddc4e Mon Sep 17 00:00:00 2001 From: David Smith Date: Thu, 26 Jun 2025 13:18:20 +0100 Subject: [PATCH] Refs #36009 -- Adjusted gis_tests.geoapp.tests.GeoLookupTest.test_relate_lookup for bug in PostGIS. ST_Relate() with PostGIS 3.5 and GEOS 3.13 gives a different result when a series of calls are made vs. single call of the same function. The fix for this is expected to be released in PostGIS 3.5.4 and 3.6.0. https://lists.osgeo.org/pipermail/postgis-devel/2025-July/030581.html https://trac.osgeo.org/postgis/ticket/5938 --- tests/gis_tests/geoapp/tests.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/gis_tests/geoapp/tests.py b/tests/gis_tests/geoapp/tests.py index 962d4f2217..7eb61eb8ef 100644 --- a/tests/gis_tests/geoapp/tests.py +++ b/tests/gis_tests/geoapp/tests.py @@ -578,7 +578,12 @@ class GeoLookupTest(TestCase): # Testing within relation mask. ks = State.objects.get(name="Kansas") self.assertEqual( - "Lawrence", City.objects.get(point__relate=(ks.poly, within_mask)).name + "Lawrence", + # Remove ".filter(name="Lawrence")" once PostGIS 3.5.4 is released. + # https://lists.osgeo.org/pipermail/postgis-devel/2025-July/030581.html + City.objects.filter(name="Lawrence") + .get(point__relate=(ks.poly, within_mask)) + .name, ) # Testing intersection relation mask.