summaryrefslogtreecommitdiff
path: root/Lib/test/test_complex.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-11-07 19:18:34 +0200
committerEzio Melotti <ezio.melotti@gmail.com>2013-11-07 19:18:34 +0200
commita5b9599538083468cffee3c052e15dd541c4bbd5 (patch)
tree62ec19c7e876881fccd49e0eada11c08ea461806 /Lib/test/test_complex.py
parentd0786a1a5036c06770f1c958323387fd682e789e (diff)
downloadcpython-git-a5b9599538083468cffee3c052e15dd541c4bbd5.tar.gz
#17080: improve error message of float/complex when the wrong type is passed.
Diffstat (limited to 'Lib/test/test_complex.py')
-rw-r--r--Lib/test/test_complex.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_complex.py b/Lib/test/test_complex.py
index f80d7ac522..cd55375bdb 100644
--- a/Lib/test/test_complex.py
+++ b/Lib/test/test_complex.py
@@ -303,6 +303,7 @@ class ComplexTest(unittest.TestCase):
self.assertRaises(TypeError, float, 5+3j)
self.assertRaises(ValueError, complex, "")
self.assertRaises(TypeError, complex, None)
+ self.assertRaisesRegex(TypeError, "not 'NoneType'", complex, None)
self.assertRaises(ValueError, complex, "\0")
self.assertRaises(ValueError, complex, "3\09")
self.assertRaises(TypeError, complex, "1", "2")