-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Closed
Labels
better-engineeringRelatively self-contained tasks for better engineering contributorsRelatively self-contained tasks for better engineering contributorsmodule: error checkingBugs related to incorrect/lacking error checkingBugs related to incorrect/lacking error checkingtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
If you use assertEqual to compare two integers you get a message like
AssertionError: False is not true : Scalars failed to compare as equal! Comparing -6 and 0 gives a difference of 6, but the allowed difference with rtol=0 and atol=0 is only 0!
The stuff about rtol and atol is is needlessly obscure and obscures the fact that, e.g., the integers in question are exit codes, for example. One easy fix is to suppress rtol/atol sentence if those are exactly zero; I'd also suggest we shouldn't report "difference" for integer comparison.
Metadata
Metadata
Assignees
Labels
better-engineeringRelatively self-contained tasks for better engineering contributorsRelatively self-contained tasks for better engineering contributorsmodule: error checkingBugs related to incorrect/lacking error checkingBugs related to incorrect/lacking error checkingtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module