summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_complex.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2016-09-24 14:28:34 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2016-09-24 14:28:34 (GMT)
commit6997946ec45378b3e9aa7d2f8c500bbcb9821739 (patch)
tree1ef91b27c2f770d9aabd4c650afc75534120c40a /Lib/test/test_complex.py
parent938da643ee4ad16a4cca65e0badd6d315feaed4f (diff)
parent613f8e513cf171a335318221b6050d470a1d765f (diff)
downloadcpython-6997946ec45378b3e9aa7d2f8c500bbcb9821739.zip
cpython-6997946ec45378b3e9aa7d2f8c500bbcb9821739.tar.gz
cpython-6997946ec45378b3e9aa7d2f8c500bbcb9821739.tar.bz2
Issue #28203: Merge from 3.5
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 6633a7a..c249ca7 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")