mirror of
https://github.com/django/django.git
synced 2025-11-19 11:15:44 +00:00
Fixed RelatedGeoModelTest.test_related_union_aggregate() test on Oracle and GEOS 3.12+.
This commit is contained in:
parent
ca3e0484ef
commit
344ae16e1e
1 changed files with 9 additions and 4 deletions
|
|
@ -100,10 +100,15 @@ class RelatedGeoModelTest(TestCase):
|
||||||
self.assertEqual(type(u3), MultiPoint)
|
self.assertEqual(type(u3), MultiPoint)
|
||||||
|
|
||||||
# Ordering of points in the result of the union is not defined and
|
# Ordering of points in the result of the union is not defined and
|
||||||
# implementation-dependent (DB backend, GEOS version)
|
# implementation-dependent (DB backend, GEOS version).
|
||||||
self.assertEqual({p.ewkt for p in ref_u1}, {p.ewkt for p in u1})
|
tests = [
|
||||||
self.assertEqual({p.ewkt for p in ref_u2}, {p.ewkt for p in u2})
|
(u1, ref_u1),
|
||||||
self.assertEqual({p.ewkt for p in ref_u1}, {p.ewkt for p in u3})
|
(u2, ref_u2),
|
||||||
|
(u3, ref_u1),
|
||||||
|
]
|
||||||
|
for union, ref in tests:
|
||||||
|
for point, ref_point in zip(sorted(union), sorted(ref), strict=True):
|
||||||
|
self.assertIs(point.equals_exact(ref_point, tolerance=6), True)
|
||||||
|
|
||||||
def test05_select_related_fk_to_subclass(self):
|
def test05_select_related_fk_to_subclass(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue