Merge pull request #4754 from Brain-organizer/testmathupdate

update test_math.py from cpython 3.11.2
This commit is contained in:
Jeong, YunWon
2023-03-25 16:40:44 +09:00
committed by GitHub

View File

@@ -1006,6 +1006,11 @@ class MathTests(unittest.TestCase):
self.assertEqual(math.dist(p, q), 5*scale)
self.assertEqual(math.dist(q, p), 5*scale)
def test_math_dist_leak(self):
# gh-98897: Check for error handling does not leak memory
with self.assertRaises(ValueError):
math.dist([1, 2], [3, 4, 5])
def testIsqrt(self):
# Test a variety of inputs, large and small.
test_values = (