(self)
| 2397 | self.assertEqual(math.ulp(-x), math.ulp(x)) |
| 2398 | |
| 2399 | def test_issue39871(self): |
| 2400 | # A SystemError should not be raised if the first arg to atan2(), |
| 2401 | # copysign(), or remainder() cannot be converted to a float. |
| 2402 | class F: |
| 2403 | def __float__(self): |
| 2404 | self.converted = True |
| 2405 | 1/0 |
| 2406 | for func in math.atan2, math.copysign, math.remainder: |
| 2407 | y = F() |
| 2408 | with self.assertRaises(TypeError): |
| 2409 | func("not a number", y) |
| 2410 | |
| 2411 | # There should not have been any attempt to convert the second |
| 2412 | # argument to a float. |
| 2413 | self.assertFalse(getattr(y, "converted", False)) |
| 2414 | |
| 2415 | def test_input_exceptions(self): |
| 2416 | self.assertRaises(TypeError, math.exp, "spam") |
nothing calls this directly
no test coverage detected