Similar to assertEqual(), but compare also the sign with copysign(). Function useful to compare signed zeros.
(self, x, y)
| 2467 | self.fail("Expected a NaN, got {!r}.".format(value)) |
| 2468 | |
| 2469 | def assertEqualSign(self, x, y): |
| 2470 | """Similar to assertEqual(), but compare also the sign with copysign(). |
| 2471 | |
| 2472 | Function useful to compare signed zeros. |
| 2473 | """ |
| 2474 | self.assertEqual(x, y) |
| 2475 | self.assertEqual(math.copysign(1.0, x), math.copysign(1.0, y)) |
| 2476 | |
| 2477 | |
| 2478 | class IsCloseTests(unittest.TestCase): |
no test coverage detected