Closed
Description
The new approx
function is great, but does not seem to work with inequalities, instead failing silently.
I.e.
def test_aprox_inequal():
assert pytest.approx(0.0) <= 5.0
gives
def test_aprox_inequal():
> assert pytest.approx(0.0) <= 5.0
E assert 0.0 ± 1.0e-12 <= 5.0
E + where 0.0 ± 1.0e-12 = <class '_pytest.python.approx'>(0.0)
E + where <class '_pytest.python.approx'> = pytest.approx
It would be great if inequality testing was also supported with approx
, and if not then this should give a better error message.