-
Notifications
You must be signed in to change notification settings - Fork 252
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
Refactor the widget tests to use MockMatrixServer
#4236
base: main
Are you sure you want to change the base?
Conversation
b0790c0
to
a628d83
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4236 +/- ##
==========================================
- Coverage 84.92% 84.92% -0.01%
==========================================
Files 274 274
Lines 29805 29831 +26
==========================================
+ Hits 25311 25333 +22
- Misses 4494 4498 +4 ☔ View full report in Codecov by Sentry. |
MockMatrixServer
a628d83
to
b345d64
Compare
How do i test |
b345d64
to
c573c2d
Compare
We usually don't test the test utilities; they should be straightforward enough that using them in tests would reveal their issues. |
…tion tests where appropriate.
c573c2d
to
e8d57ca
Compare
Examples in the docstrings will be run as the doc tests which can run and test the mocks. At least that's how I wrote all the examples for the |
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.
Thanks for working on this. Left a couple of nits about linkifying doc references and a couple more examples would be neat.
/// | ||
/// # Examples | ||
/// | ||
/// see also [mock_room_send] for more context. |
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.
/// see also [mock_room_send] for more context. | |
/// see also [`MatrixMockServer::mock_room_send`] for more context. |
/// Similar to: [mock_room_send] | ||
/// | ||
/// Note: works with *any* room. | ||
/// Note: works with *any* event type. |
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.
Would be nice to add an example for this one as well.
/// | ||
/// Similar to: [mock_room_send] | ||
/// | ||
/// Note: works with *any* room. |
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.
An example would be nice as well, they would have helped you when you first encountered the MatrixMockServer
.
This is a follow up PR on: #3987
And tries to use the
MockMatrixServer
wherever reasonable in the widget integration tests.Signed-off-by: