diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-11-07 19:18:34 +0200 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-11-07 19:18:34 +0200 |
commit | a5b9599538083468cffee3c052e15dd541c4bbd5 (patch) | |
tree | 62ec19c7e876881fccd49e0eada11c08ea461806 /Lib/test/test_complex.py | |
parent | d0786a1a5036c06770f1c958323387fd682e789e (diff) | |
download | cpython-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.py | 1 |
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") |