Skip to content

Commit 8b3bb52

Browse files
committed
* hypot: L2630
1 parent 3a80c78 commit 8b3bb52

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_math.py

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

0 commit comments

Comments
 (0)