summaryrefslogtreecommitdiff
path: root/Lib/test/test_complex.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2016-09-24 15:29:07 +0100
committerMark Dickinson <dickinsm@gmail.com>2016-09-24 15:29:07 +0100
commit3992d6e5e153f327e66a4f16fc322bf36be91d76 (patch)
tree7a4bc550daefbf6152d48f760fe6010cd924eada /Lib/test/test_complex.py
parentae0fa7ee6c00fb9b7be846c819d4132ac8afc0d0 (diff)
parent6997946ec45378b3e9aa7d2f8c500bbcb9821739 (diff)
downloadcpython-git-3992d6e5e153f327e66a4f16fc322bf36be91d76.tar.gz
Issue #28203: Merge from 3.6
Diffstat (limited to 'Lib/test/test_complex.py')
-rw-r--r--Lib/test/test_complex.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_complex.py b/Lib/test/test_complex.py
index 6633a7ae54..c249ca724b 100644
--- a/Lib/test/test_complex.py
+++ b/Lib/test/test_complex.py
@@ -328,6 +328,14 @@ class ComplexTest(unittest.TestCase):
self.assertRaises(ValueError, complex, "1e1ej")
self.assertRaises(ValueError, complex, "1e++1ej")
self.assertRaises(ValueError, complex, ")1+2j(")
+ self.assertRaisesRegex(
+ TypeError,
+ "first argument must be a string or a number, not 'dict'",
+ complex, {1:2}, 1)
+ self.assertRaisesRegex(
+ TypeError,
+ "second argument must be a number, not 'dict'",
+ complex, 1, {1:2})
# the following three are accepted by Python 2.6
self.assertRaises(ValueError, complex, "1..1j")
self.assertRaises(ValueError, complex, "1.11.1j")