Skip to content

Commit

Permalink
* hypot: L2630
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Sep 28, 2023
1 parent 3a80c78 commit 8b3bb52
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Lib/test/test_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,8 @@ def testHypot(self):
# Test allowable types (those with __float__)
self.assertEqual(hypot(12.0, 5.0), 13.0)
self.assertEqual(hypot(12, 5), 13)
self.assertEqual(hypot(1, -1), 1.4142135623730951)
self.assertEqual(hypot(1, FloatLike(-1.)), 1.4142135623730951)
self.assertEqual(hypot(Decimal(12), Decimal(5)), 13)
self.assertEqual(hypot(Fraction(12, 32), Fraction(5, 32)), Fraction(13, 32))
self.assertEqual(hypot(bool(1), bool(0), bool(1), bool(1)), math.sqrt(3))
Expand Down

0 comments on commit 8b3bb52

Please sign in to comment.