33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Karolina Surma <ksurma@redhat.com>
|
|
Date: Mon, 24 Jan 2022 09:28:30 +0100
|
|
Subject: [PATCH] 00375: Fix test_distance to enable build on i686
|
|
|
|
Fix precision in test_distance (test.test_turtle.TestVec2D).
|
|
See: https://bugzilla.redhat.com/show_bug.cgi?id=2038843
|
|
---
|
|
Lib/test/test_turtle.py | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/Lib/test/test_turtle.py b/Lib/test/test_turtle.py
|
|
index 2fd10ccd50..2d2034ef8a 100644
|
|
--- a/Lib/test/test_turtle.py
|
|
+++ b/Lib/test/test_turtle.py
|
|
@@ -220,7 +220,7 @@ class TestVec2D(VectorComparisonMixin, unittest.TestCase):
|
|
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
|
|
@@ -228,7 +228,7 @@ class TestVec2D(VectorComparisonMixin, unittest.TestCase):
|
|
|
|
vec = Vec2D(2.5, 6)
|
|
expected = 6.5
|
|
- self.assertEqual(abs(vec), expected)
|
|
+ self.assertAlmostEqual(abs(vec), expected)
|
|
|
|
def test_rotate(self):
|
|
|