-
Notifications
You must be signed in to change notification settings - Fork 25
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
199 test helpers for assering value reading and configuration #226
199 test helpers for assering value reading and configuration #226
Conversation
…y function to signal.py
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.
Looks like this is on the right track, thanks!
src/ophyd_async/core/signal.py
Outdated
await verify_readable(configurable.read_configuration, configuration) | ||
|
||
|
||
def assert_emitted(docs: Dict[str, list], **numbers: int): |
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.
You can import DocumentType
from event model
def assert_emitted(docs: Dict[str, list], **numbers: int): | |
def assert_emitted(docs: DocumentType, **numbers: int): |
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.
Although docs is a dict of document name to list of document instances, so I think that should be:
def assert_emitted(docs: Dict[str, list], **numbers: int): | |
def assert_emitted(docs: Dict[str, list[DocumentType]], **numbers: int): |
Except DocumentType
is actually the types, which is not what we want, we would quite like a similar Document
union in event model...
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.
so in the absence of that it's probably as correct as it could be...
…and-configuration
Please could you also add to the "writing tests for devices" doc the information on how to use |
I will deal with #206 the conflicts and all the changes once the main branch is stable, atm the doc will not build correctly. |
…and-configuration
spotted a typo
I think I got everything, but please have a quick check if it all make sense and I have covered everything. |
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.
Docs look good, only a couple of formatting points
Co-authored-by: Callum Forrester <[email protected]>
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!
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.
Sorry, one last thing
…dict and removed import
…and-configuration
This is to fix #199 and possibly #206
Acceptance Criteria
For #206 Need to document 2 ways: