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
Really, there is only one value causing an issue. It would be easier to write and fix tests if the output here only contained the breaking differences.
The text was updated successfully, but these errors were encountered:
olliesilvester
changed the title
Testing assert functions don't work with approximate values
Testing assert functions give confusing message on failure
Jan 27, 2025
A possible fix is to allow the user to omit timestamp and alarm severity from the expected values, and if not present then put the actual values into the expected values so the diff is smaller.
assert_reading
andassert_configuration
give a confusingfull diff
when an equality fails, making it hard to see the actual issue.As an example, if we change
test_assert_reading
intests/core/test_signal.py
so that thedummy_reading
hastimestamp: 5
, this is the test outputReally, there is only one value causing an issue. It would be easier to write and fix tests if the output here only contained the breaking differences.
The text was updated successfully, but these errors were encountered: