Blame 00375-fix-test_distance-to-enable-Python-build-on-i686.patch
|
|
46656ef |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
46656ef |
From: Karolina Surma <ksurma@redhat.com>
|
|
|
46656ef |
Date: Mon, 24 Jan 2022 08:56:03 +0100
|
|
|
46656ef |
Subject: [PATCH] 00375-fix-test_distance-to-enable-Python-build-on-i686.patch
|
|
|
46656ef |
|
|
|
46656ef |
00375 #
|
|
|
46656ef |
Fix precision in test_distance (test.test_turtle.TestVec2D).
|
|
|
46656ef |
See: https://bugzilla.redhat.com/show_bug.cgi?id=2038843
|
|
|
46656ef |
---
|
|
|
46656ef |
Lib/test/test_turtle.py | 4 ++--
|
|
|
46656ef |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
46656ef |
|
|
|
46656ef |
diff --git a/Lib/test/test_turtle.py b/Lib/test/test_turtle.py
|
|
|
46656ef |
index 8f8434c5f4c..f7f28174463 100644
|
|
|
46656ef |
--- a/Lib/test/test_turtle.py
|
|
|
46656ef |
+++ b/Lib/test/test_turtle.py
|
|
|
46656ef |
@@ -217,7 +217,7 @@ class TestVec2D(VectorComparisonMixin, unittest.TestCase):
|
|
|
46656ef |
def test_distance(self):
|
|
|
46656ef |
vec = Vec2D(6, 8)
|
|
|
46656ef |
expected = 10
|
|
|
46656ef |
- self.assertEqual(abs(vec), expected)
|
|
|
46656ef |
+ self.assertAlmostEqual(abs(vec), expected)
|
|
|
46656ef |
|
|
|
46656ef |
vec = Vec2D(0, 0)
|
|
|
46656ef |
expected = 0
|
|
|
46656ef |
@@ -225,7 +225,7 @@ class TestVec2D(VectorComparisonMixin, unittest.TestCase):
|
|
|
46656ef |
|
|
|
46656ef |
vec = Vec2D(2.5, 6)
|
|
|
46656ef |
expected = 6.5
|
|
|
46656ef |
- self.assertEqual(abs(vec), expected)
|
|
|
46656ef |
+ self.assertAlmostEqual(abs(vec), expected)
|
|
|
46656ef |
|
|
|
46656ef |
def test_rotate(self):
|
|
|
46656ef |
|