mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Issue #28203: Merge from 3.5
This commit is contained in:
commit
6997946ec4
4 changed files with 29 additions and 6 deletions
|
@ -328,6 +328,14 @@ class ComplexTest(unittest.TestCase):
|
|||
self.assertRaises(ValueError, complex, "1e1ej")
|
||||
self.assertRaises(ValueError, complex, "1e++1ej")
|
||||
self.assertRaises(ValueError, complex, ")1+2j(")
|
||||
self.assertRaisesRegex(
|
||||
TypeError,
|
||||
"first argument must be a string or a number, not 'dict'",
|
||||
complex, {1:2}, 1)
|
||||
self.assertRaisesRegex(
|
||||
TypeError,
|
||||
"second argument must be a number, not 'dict'",
|
||||
complex, 1, {1:2})
|
||||
# the following three are accepted by Python 2.6
|
||||
self.assertRaises(ValueError, complex, "1..1j")
|
||||
self.assertRaises(ValueError, complex, "1.11.1j")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue