File tree Expand file tree Collapse file tree
tests/gis_tests/relatedapp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,10 +100,15 @@ def test_related_union_aggregate(self):
100100 self .assertEqual (type (u3 ), MultiPoint )
101101
102102 # Ordering of points in the result of the union is not defined and
103- # implementation-dependent (DB backend, GEOS version)
104- self .assertEqual ({p .ewkt for p in ref_u1 }, {p .ewkt for p in u1 })
105- self .assertEqual ({p .ewkt for p in ref_u2 }, {p .ewkt for p in u2 })
106- self .assertEqual ({p .ewkt for p in ref_u1 }, {p .ewkt for p in u3 })
103+ # implementation-dependent (DB backend, GEOS version).
104+ tests = [
105+ (u1 , ref_u1 ),
106+ (u2 , ref_u2 ),
107+ (u3 , ref_u1 ),
108+ ]
109+ for union , ref in tests :
110+ for point , ref_point in zip (sorted (union ), sorted (ref ), strict = True ):
111+ self .assertIs (point .equals_exact (ref_point , tolerance = 6 ), True )
107112
108113 def test05_select_related_fk_to_subclass (self ):
109114 """
You can’t perform that action at this time.
0 commit comments