bpo-44734: Fix floating point precision in test_turtle (GH-30910)

This commit is contained in:
Karolina Surma 2022-01-27 14:57:55 +01:00 committed by GitHub
parent 3d2ce34716
commit aa78287bc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -235,7 +235,7 @@ class TestVec2D(VectorComparisonMixin, unittest.TestCase):
self.assertVectorsAlmostEqual(-vec, expected)
def test_distance(self):
self.assertEqual(abs(Vec2D(6, 8)), 10)
self.assertAlmostEqual(abs(Vec2D(6, 8)), 10)
self.assertEqual(abs(Vec2D(0, 0)), 0)
self.assertAlmostEqual(abs(Vec2D(2.5, 6)), 6.5)