diff options
| author | Sergey Fedoseev <fedoseev.sergey@gmail.com> | 2016-12-16 03:36:18 +0600 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-12-15 16:36:18 -0500 |
| commit | 4884472447db11c57405edd5bdff36a171decd28 (patch) | |
| tree | 03c635b03172c09247c57a9c512edc2eb0b7d451 /tests | |
| parent | 8ab8a8910c6f9382610cba5b06ac5c110d52b4b2 (diff) | |
Fixed #27576 -- Made get_srid_info() fallback to GDAL if SpatialRefSys is unavailable.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/gis_tests/distapp/tests.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/gis_tests/distapp/tests.py b/tests/gis_tests/distapp/tests.py index a62ea46280..6060f00461 100644 --- a/tests/gis_tests/distapp/tests.py +++ b/tests/gis_tests/distapp/tests.py @@ -475,8 +475,7 @@ class DistanceFunctionsTests(TestCase): # Tolerance has to be lower for Oracle tol = 2 for i, z in enumerate(SouthTexasZipcode.objects.annotate(area=Area('poly')).order_by('name')): - # MySQL is returning a raw float value - self.assertAlmostEqual(area_sq_m[i], z.area.sq_m if hasattr(z.area, 'sq_m') else z.area, tol) + self.assertAlmostEqual(area_sq_m[i], z.area.sq_m, tol) @skipUnlessDBFeature("has_Distance_function") def test_distance_simple(self): @@ -488,7 +487,7 @@ class DistanceFunctionsTests(TestCase): houston = SouthTexasCity.objects.annotate(dist=Distance('point', lagrange)).order_by('id').first() tol = 2 if oracle else 5 self.assertAlmostEqual( - houston.dist.m if hasattr(houston.dist, 'm') else houston.dist, + houston.dist.m, 147075.069813, tol ) @@ -656,7 +655,7 @@ class DistanceFunctionsTests(TestCase): # Now doing length on a projected coordinate system. i10 = SouthTexasInterstate.objects.annotate(length=Length('path')).get(name='I-10') - self.assertAlmostEqual(len_m2, i10.length.m if isinstance(i10.length, D) else i10.length, 2) + self.assertAlmostEqual(len_m2, i10.length.m, 2) self.assertTrue( SouthTexasInterstate.objects.annotate(length=Length('path')).filter(length__gt=4000).exists() ) |
