diff options
Diffstat (limited to 'tests/gis_tests/geoapp/test_functions.py')
| -rw-r--r-- | tests/gis_tests/geoapp/test_functions.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/gis_tests/geoapp/test_functions.py b/tests/gis_tests/geoapp/test_functions.py index 22d40a4400..a1b1f48e02 100644 --- a/tests/gis_tests/geoapp/test_functions.py +++ b/tests/gis_tests/geoapp/test_functions.py @@ -183,7 +183,11 @@ class GISFunctionsTests(FuncTestMixin, TestCase): def test_azimuth(self): # Returns the azimuth in radians. azimuth_expr = functions.Azimuth(Point(0, 0, srid=4326), Point(1, 1, srid=4326)) - self.assertAlmostEqual(City.objects.annotate(azimuth=azimuth_expr).first().azimuth, math.pi / 4) + self.assertAlmostEqual( + City.objects.annotate(azimuth=azimuth_expr).first().azimuth, + math.pi / 4, + places=2, + ) # Returns None if the two points are coincident. azimuth_expr = functions.Azimuth(Point(0, 0, srid=4326), Point(0, 0, srid=4326)) self.assertIsNone(City.objects.annotate(azimuth=azimuth_expr).first().azimuth) |
