summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_complex.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-10-26 21:51:18 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-10-26 21:51:18 (GMT)
commitf972488213c359e251d6a0b06759ce19ef33e48d (patch)
tree94b3d779d16fb7e6cc8ed6f4218589a2aaf6d309 /Lib/test/test_complex.py
parentf0966c95687d1847b524f8794835568858a7934c (diff)
downloadcpython-f972488213c359e251d6a0b06759ce19ef33e48d.zip
cpython-f972488213c359e251d6a0b06759ce19ef33e48d.tar.gz
cpython-f972488213c359e251d6a0b06759ce19ef33e48d.tar.bz2
Remove length limitation on string arguments to complex()
Diffstat (limited to 'Lib/test/test_complex.py')
-rw-r--r--Lib/test/test_complex.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_complex.py b/Lib/test/test_complex.py
index faa7e1f..9341016 100644
--- a/Lib/test/test_complex.py
+++ b/Lib/test/test_complex.py
@@ -284,7 +284,6 @@ class ComplexTest(unittest.TestCase):
self.assertRaises(ValueError, complex, "1+2j)")
self.assertRaises(ValueError, complex, "1+(2j)")
self.assertRaises(ValueError, complex, "(1+2j)123")
- self.assertRaises(ValueError, complex, "1"*500)
self.assertRaises(ValueError, complex, "x")
self.assertRaises(ValueError, complex, "1j+2")
self.assertRaises(ValueError, complex, "1e1ej")
@@ -295,6 +294,9 @@ class ComplexTest(unittest.TestCase):
self.assertRaises(ValueError, complex, "1.11.1j")
self.assertRaises(ValueError, complex, "1e1.1j")
+ # check that complex accepts long unicode strings
+ self.assertEqual(type(complex("1"*500)), complex)
+
class EvilExc(Exception):
pass