Skip to content

Commit 35db224

Browse files
committed
Amend 8b3bb52 (use math.sqrt(2) instead)
1 parent 3e8d96f commit 35db224

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_math.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -809,8 +809,8 @@ def testHypot(self):
809809
# Test allowable types (those with __float__)
810810
self.assertEqual(hypot(12.0, 5.0), 13.0)
811811
self.assertEqual(hypot(12, 5), 13)
812-
self.assertEqual(hypot(1, -1), 1.4142135623730951)
813-
self.assertEqual(hypot(1, FloatLike(-1.)), 1.4142135623730951)
812+
self.assertEqual(hypot(1, -1), math.sqrt(2))
813+
self.assertEqual(hypot(1, FloatLike(-1.)), math.sqrt(2))
814814
self.assertEqual(hypot(Decimal(12), Decimal(5)), 13)
815815
self.assertEqual(hypot(Fraction(12, 32), Fraction(5, 32)), Fraction(13, 32))
816816
self.assertEqual(hypot(bool(1), bool(0), bool(1), bool(1)), math.sqrt(3))

0 commit comments

Comments
 (0)