(self)
| 378 | 1.1 == approx(1, rel, abs) |
| 379 | |
| 380 | def test_negative_tolerance_message(self): |
| 381 | # Error message for negative tolerance should include the value. |
| 382 | with pytest.raises(ValueError, match="-3"): |
| 383 | 0 == approx(1, abs=-3) |
| 384 | with pytest.raises(ValueError, match="-3"): |
| 385 | 0 == approx(1, rel=-3) |
| 386 | |
| 387 | def test_inf_tolerance(self): |
| 388 | # Everything should be equal if the tolerance is infinite. |