-
Notifications
You must be signed in to change notification settings - Fork 26
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
Assert statements broken in tests #618
Comments
The other alternative is to document that you should use async def test_assert_reading_array(mock_signal_array: SignalRW):
set_mock_value(mock_signal_array, [1, 2, 4.5])
dummy_reading = {
"mock_signal": Reading(
{"alarm_severity": 0, "timestamp": ANY, "value": pytest.approx([1, 2, 4.5])}
)
}
await assert_reading(mock_signal_array, dummy_reading) @rtuck99 do you prefer moving |
An in between option: do the |
assert_configuration()
(and presumably also assert_reading()
) are broken for numpy array types. I guess they probably were already broken before these changes, but one of the tests in dodal uses assert_configuration and I encountered this as I'm currently in the process of going through dodal and mx-bluesky to test out this PR.
Decided to move things to |
@Relm-Arrowny are you interested in taking this on? |
sure, sound easy enough. |
I will keep you posted if I find any other issues.
Originally posted by @rtuck99 in #594 (comment)
I suggest that we move the
assert
functions into a newophyd_async.testing
package, makepytest
a dependency of it, then usepytest.approx
on the valueThe text was updated successfully, but these errors were encountered: