mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-34838: Use subclass_of for math.dist. (GH-9659)
Argument clinic now generates fast inline code for positional parsing, so the manually implemented type check in math.dist can be removed.
This commit is contained in:
parent
fdf282d609
commit
cb08a71c5c
3 changed files with 14 additions and 9 deletions
|
@ -867,6 +867,8 @@ class MathTests(unittest.TestCase):
|
|||
dist((1, 2, 3, 4), (5, 6, 7))
|
||||
with self.assertRaises(ValueError): # Check dimension agree
|
||||
dist((1, 2, 3), (4, 5, 6, 7))
|
||||
with self.assertRaises(TypeError): # Rejects invalid types
|
||||
dist("abc", "xyz")
|
||||
|
||||
# Verify that the one dimensional case is equivalent to abs()
|
||||
for i in range(20):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue