MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_negative_zero_repr_str

Method test_negative_zero_repr_str

Lib/test/test_complex.py:820–833  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 1

testFunction · 0.70

Tested by

no test coverage detected