| 813 | |
| 814 | @support.requires_IEEE_754 |
| 815 | def test_negative_zero_repr_str(self): |
| 816 | def test(v, expected, test_fn=self.assertEqual): |
| 817 | test_fn(repr(v), expected) |
| 818 | test_fn(str(v), expected) |
| 819 | |
| 820 | test(complex(0., 1.), "1j") |
| 821 | test(complex(-0., 1.), "(-0+1j)") |
| 822 | test(complex(0., -1.), "-1j") |
| 823 | test(complex(-0., -1.), "(-0-1j)") |
| 824 | |
| 825 | test(complex(0., 0.), "0j") |
| 826 | test(complex(0., -0.), "-0j") |
| 827 | test(complex(-0., 0.), "(-0+0j)") |
| 828 | test(complex(-0., -0.), "(-0-0j)") |
| 829 | |
| 830 | def test_pos(self): |
| 831 | self.assertEqual(+(1+6j), 1+6j) |