Skip to content

Commit 8c5a279

Browse files
authored
Merge pull request #4754 from Brain-organizer/testmathupdate
update test_math.py from cpython 3.11.2
2 parents c7081f9 + 3a13a7b commit 8c5a279

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Lib/test/test_math.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,11 @@ class T(tuple):
10061006
self.assertEqual(math.dist(p, q), 5*scale)
10071007
self.assertEqual(math.dist(q, p), 5*scale)
10081008

1009+
def test_math_dist_leak(self):
1010+
# gh-98897: Check for error handling does not leak memory
1011+
with self.assertRaises(ValueError):
1012+
math.dist([1, 2], [3, 4, 5])
1013+
10091014
def testIsqrt(self):
10101015
# Test a variety of inputs, large and small.
10111016
test_values = (

0 commit comments

Comments
 (0)