(self)
| 2490 | self.assertEqual(math.ulp(-x), math.ulp(x)) |
| 2491 | |
| 2492 | def test_issue39871(self): |
| 2493 | # A SystemError should not be raised if the first arg to atan2(), |
| 2494 | # copysign(), or remainder() cannot be converted to a float. |
| 2495 | class F: |
| 2496 | def __float__(self): |
| 2497 | self.converted = True |
| 2498 | 1/0 |
| 2499 | for func in math.atan2, math.copysign, math.remainder: |
| 2500 | y = F() |
| 2501 | with self.assertRaises(TypeError): |
| 2502 | func("not a number", y) |
| 2503 | |
| 2504 | # There should not have been any attempt to convert the second |
| 2505 | # argument to a float. |
| 2506 | self.assertFalse(getattr(y, "converted", False)) |
| 2507 | |
| 2508 | def test_input_exceptions(self): |
| 2509 | self.assertRaises(TypeError, math.exp, "spam") |
nothing calls this directly
no test coverage detected