(self)
| 477 | assert op(a, approx(x, rel=1e-6, abs=1e-12)) |
| 478 | |
| 479 | def test_expecting_inf(self): |
| 480 | examples = [ |
| 481 | (eq, inf, inf), |
| 482 | (eq, -inf, -inf), |
| 483 | (ne, inf, -inf), |
| 484 | (ne, 0.0, inf), |
| 485 | (ne, nan, inf), |
| 486 | ] |
| 487 | for op, a, x in examples: |
| 488 | assert op(a, approx(x)) |
| 489 | |
| 490 | def test_expecting_nan(self): |
| 491 | examples = [ |