1
0
mirror of https://github.com/django/django.git synced 2025-08-21 01:09:13 +00:00

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
This commit is contained in:
David Smith 2025-06-26 13:18:20 +01:00 committed by nessita
parent 77d455ae73
commit d0113c1711

View File

@ -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.