diff options
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2010-12-04 03:38:46 (GMT) |
---|---|---|
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2010-12-04 03:38:46 (GMT) |
commit | 942af5a9a45b7b4976bea2e794eccaaf2b3b5c09 (patch) | |
tree | f621bdffa16dd0b04d7bf60d6a32f198fc7b3ec8 /Lib/test/test_complex.py | |
parent | 36526bf3d95763afa6d4efe402b8840b1532d637 (diff) | |
download | cpython-942af5a9a45b7b4976bea2e794eccaaf2b3b5c09.zip cpython-942af5a9a45b7b4976bea2e794eccaaf2b3b5c09.tar.gz cpython-942af5a9a45b7b4976bea2e794eccaaf2b3b5c09.tar.bz2 |
Issue #10557: Fixed error messages from float() and other numeric
types. Added a new API function, PyUnicode_TransformDecimalToASCII(),
which transforms non-ASCII decimal digits in a Unicode string to their
ASCII equivalents.
Diffstat (limited to 'Lib/test/test_complex.py')
-rw-r--r-- | Lib/test/test_complex.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_complex.py b/Lib/test/test_complex.py index cc21aa7..2352ef1 100644 --- a/Lib/test/test_complex.py +++ b/Lib/test/test_complex.py @@ -220,6 +220,7 @@ class ComplexTest(unittest.TestCase): self.assertEqual(complex(NS(1+10j)), 1+10j) self.assertRaises(TypeError, complex, OS(None)) self.assertRaises(TypeError, complex, NS(None)) + self.assertRaises(TypeError, complex, {}) self.assertAlmostEqual(complex("1+10j"), 1+10j) self.assertAlmostEqual(complex(10), 10+0j) @@ -325,6 +326,8 @@ class ComplexTest(unittest.TestCase): # check that complex accepts long unicode strings self.assertEqual(type(complex("1"*500)), complex) + # check whitespace processing + self.assertEqual(complex('\N{EM SPACE}(\N{EN SPACE}1+1j ) '), 1+1j) class EvilExc(Exception): pass |