Skip to content

Commit

Permalink
00375: Fix test_distance to enable build on i686
Browse files Browse the repository at this point in the history
Fix precision in test_distance (test.test_turtle.TestVec2D).
See: https://bugzilla.redhat.com/show_bug.cgi?id=2038843
  • Loading branch information
befeleme authored and stratakis committed Mar 20, 2024
1 parent 4b5262b commit ec58407
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/test/test_turtle.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,15 @@ def test_vector_negative(self):
def test_distance(self):
vec = Vec2D(6, 8)
expected = 10
self.assertEqual(abs(vec), expected)
self.assertAlmostEqual(abs(vec), expected)

vec = Vec2D(0, 0)
expected = 0
self.assertEqual(abs(vec), expected)

vec = Vec2D(2.5, 6)
expected = 6.5
self.assertEqual(abs(vec), expected)
self.assertAlmostEqual(abs(vec), expected)

def test_rotate(self):

Expand Down

0 comments on commit ec58407

Please sign in to comment.