You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
> expect_equal(415, 416, 0.01) # 0.01 silently not passed on to all.equal, apparently
Error: 415 not equal to 416
416 - 415 == 1
> expect_equal(415, 416, tolerance=0.01) # tolerance= now required.
We all know we should always name our arguments. Anyone who hasn't may now be bitten by this when they upgrade. It's the silent apparent ignoring of the 3rd argument that's confusing. ?expect_equals contains ... = other values passed to all.equal and when you then look at ?all.equal it seems reasonable to assume the 3rd argument matches up with the 3rd argument of all.equal (i.e. tolerance).
A few solutions I can think of are i) restoring previous behaviour, ii) catch and warn/error about any unnamed arguments or iii) add to ?expect_equals that tolerance must now be explicitly named.
The text was updated successfully, but these errors were encountered: