-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added Assertion error messages to assert_ functions #307
added Assertion error messages to assert_ functions #307
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, a few nitpicks, only major thing is the content of the error message
src/ophyd_async/core/signal.py
Outdated
@@ -316,7 +316,8 @@ async def assert_reading( | |||
await assert_reading(readable, reading) | |||
|
|||
""" | |||
assert await readable.read() == reading | |||
the_reading = await readable.read() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I think actual_reading
and expected_reading
are more informative names than the_reading
and reading
. Ditto for configuration.
Made it easier to play spot the different when assertion failed by adding some colour and spaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Added assert error messages to fix #296.