Test update
* updates tests for SRID migration
This commit is contained in:
@@ -430,15 +430,13 @@ class BaseTestCase(TestCase):
|
||||
self.assertTrue(True)
|
||||
return
|
||||
|
||||
tolerance = 0.001
|
||||
if geom1.srid != geom2.srid:
|
||||
tolerance = 0.001
|
||||
# Due to prior possible transformation of any of these geometries, we need to make sure there exists a
|
||||
# transformation from one coordinate system into the other, which is valid
|
||||
geom1_t = geom1.transform(geom2.srid, clone=True)
|
||||
geom2_t = geom2.transform(geom1.srid, clone=True)
|
||||
self.assertTrue(geom1_t.equals_exact(geom2, tolerance) or geom2_t.equals_exact(geom1, tolerance))
|
||||
else:
|
||||
self.assertTrue(geom1.equals(geom2))
|
||||
geom1.transform(geom2.srid)
|
||||
geom2.transform(geom1.srid)
|
||||
self.assertTrue(geom1.equals_exact(geom2, tolerance) or geom2.equals_exact(geom1, tolerance))
|
||||
|
||||
|
||||
class BaseViewTestCase(BaseTestCase):
|
||||
|
||||
Reference in New Issue
Block a user