mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Fix repr for negative imaginary part. Fixes #1013908.
This commit is contained in:
parent
f82a9ded39
commit
70aa1f2095
2 changed files with 7 additions and 2 deletions
|
@ -286,6 +286,7 @@ class ComplexTest(unittest.TestCase):
|
|||
|
||||
def test_repr(self):
|
||||
self.assertEqual(repr(1+6j), '(1+6j)')
|
||||
self.assertEqual(repr(1-6j), '(1-6j)')
|
||||
|
||||
def test_neg(self):
|
||||
self.assertEqual(-(1+6j), -1-6j)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue