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

Method assertEqualAndEqualSign

Lib/test/test_float.py:381–385  ·  view source on GitHub ↗
(self, a, b)

Source from the content-addressed store, hash-verified

379 self.assertTrue(d == d, "{%r : None} not equal to itself" % f)
380
381 def assertEqualAndEqualSign(self, a, b):
382 # fail unless a == b and a and b have the same sign bit;
383 # the only difference from assertEqual is that this test
384 # distinguishes -0.0 and 0.0.
385 self.assertEqual((a, copysign(1.0, a)), (b, copysign(1.0, b)))
386
387 def test_float_floor(self):
388 self.assertIsInstance(float(0.5).__floor__(), int)

Callers 2

test_float_modMethod · 0.95
test_float_powMethod · 0.95

Calls 2

copysignFunction · 0.90
assertEqualMethod · 0.45

Tested by

no test coverage detected