(self)
| 473 | 1.1 == approx(1, rel, abs) |
| 474 | |
| 475 | def test_negative_tolerance_message(self): |
| 476 | # Error message for negative tolerance should include the value. |
| 477 | with pytest.raises(ValueError, match="-3"): |
| 478 | 0 == approx(1, abs=-3) |
| 479 | with pytest.raises(ValueError, match="-3"): |
| 480 | 0 == approx(1, rel=-3) |
| 481 | |
| 482 | def test_inf_tolerance(self): |
| 483 | # Everything should be equal if the tolerance is infinite. |