diff options
Diffstat (limited to 'Lib/test/test_complex.py')
-rw-r--r-- | Lib/test/test_complex.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_complex.py b/Lib/test/test_complex.py index 1bb31dd76f..42dc3cfc75 100644 --- a/Lib/test/test_complex.py +++ b/Lib/test/test_complex.py @@ -338,6 +338,13 @@ class ComplexTest(unittest.TestCase): except (OSError, IOError): pass + if float.__getformat__("double").startswith("IEEE"): + def test_plus_minus_0j(self): + # test that -0j and 0j literals are not identified + z1, z2 = 0j, -0j + self.assertEquals(atan2(z1.imag, -1.), atan2(0., -1.)) + self.assertEquals(atan2(z2.imag, -1.), atan2(-0., -1.)) + def test_main(): test_support.run_unittest(ComplexTest) |