diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2025-10-20 16:03:39 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2025-10-20 16:05:11 +0200 |
| commit | d2a69d730bd94298e5a1045fbdffe829d4ff7299 (patch) | |
| tree | d2bc5ac665bbe78ba7c0baa4f8cb908752dcdb0f /tests | |
| parent | 195836b69af24d3c10fa994fb772c5be1cf065da (diff) | |
[6.0.x] Fixed RelatedGeoModelTest.test_related_union_aggregate() test on Oracle and GEOS 3.12+.
Backport of 344ae16e1e21ab7c0b594d755519738f7f16eaf1 from main
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/gis_tests/relatedapp/tests.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/gis_tests/relatedapp/tests.py b/tests/gis_tests/relatedapp/tests.py index 34dc2bba15..8baf65be27 100644 --- a/tests/gis_tests/relatedapp/tests.py +++ b/tests/gis_tests/relatedapp/tests.py @@ -100,10 +100,15 @@ class RelatedGeoModelTest(TestCase): self.assertEqual(type(u3), MultiPoint) # Ordering of points in the result of the union is not defined and - # implementation-dependent (DB backend, GEOS version) - self.assertEqual({p.ewkt for p in ref_u1}, {p.ewkt for p in u1}) - self.assertEqual({p.ewkt for p in ref_u2}, {p.ewkt for p in u2}) - self.assertEqual({p.ewkt for p in ref_u1}, {p.ewkt for p in u3}) + # implementation-dependent (DB backend, GEOS version). + tests = [ + (u1, ref_u1), + (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): """ |
