summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAmmar Askar <ammar_askar@hotmail.com>2019-01-12 06:23:41 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2019-01-12 06:23:41 (GMT)
commitcb08a71c5c534f33d9486677534dafb087c30e8c (patch)
tree19b46ba5dda5c870c2a2f8614e19e3831e5f3ec8 /Lib
parentfdf282d609fd172d52b59a6f1f062eb701494528 (diff)
downloadcpython-cb08a71c5c534f33d9486677534dafb087c30e8c.zip
cpython-cb08a71c5c534f33d9486677534dafb087c30e8c.tar.gz
cpython-cb08a71c5c534f33d9486677534dafb087c30e8c.tar.bz2
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.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_math.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py
index 9b2f55e..b476a39 100644
--- a/Lib/test/test_math.py
+++ b/Lib/test/test_math.py
@@ -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):