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.Dismiss alert
allclose_tolerances allow backends to override default allclose tolerances for specific tests. These can work with signals_allclose by making it use the allclose fixture rather than np.allclose, but it still uses its default tolerances for plotting. This means that in the plots, the error can look like it's outside tolerances, while the test passes because the error is within the overridden tolerances.
Expected behavior
The allclose fixture supports different tolerances each time it's called, by passing a list to allclose_tolerances. Supporting this seems difficult. More straightforward would be to use _get_allclose_overrides (from pytest-allclose) in signals_allclose, and just use the first (or last?) tolerance if applicable. (I think all our tests that use signals_allclose just have one allclose comparison.)
The text was updated successfully, but these errors were encountered:
I wonder if we should move the stuff in signals_allclose into the pytest-allclose repo? I.e. give an easy way to generate those plots by passing plot=True or something like that to allclose. If we're going to touch that code anyway, that is.
Describe the bug
allclose_tolerances
allow backends to override defaultallclose
tolerances for specific tests. These can work withsignals_allclose
by making it use theallclose
fixture rather thannp.allclose
, but it still uses its default tolerances for plotting. This means that in the plots, the error can look like it's outside tolerances, while the test passes because the error is within the overridden tolerances.Expected behavior
The
allclose
fixture supports different tolerances each time it's called, by passing a list toallclose_tolerances
. Supporting this seems difficult. More straightforward would be to use_get_allclose_overrides
(frompytest-allclose
) insignals_allclose
, and just use the first (or last?) tolerance if applicable. (I think all our tests that usesignals_allclose
just have oneallclose
comparison.)The text was updated successfully, but these errors were encountered: