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