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_float.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_float.py')
-rw-r--r-- | Lib/test/test_float.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_float.py b/Lib/test/test_float.py index 502292f615..5c2dc3ff3b 100644 --- a/Lib/test/test_float.py +++ b/Lib/test/test_float.py @@ -41,6 +41,7 @@ class GeneralFloatCases(unittest.TestCase): self.assertRaises(ValueError, float, "-.") self.assertRaises(ValueError, float, b"-") self.assertRaises(TypeError, float, {}) + self.assertRaisesRegex(TypeError, "not 'dict'", float, {}) # Lone surrogate self.assertRaises(UnicodeEncodeError, float, '\uD8F0') # check that we don't accept alternate exponent markers |