assert_events
- ska_mid_cbf_mcs.testing.assertions.assert_events(expected_events: tuple[tuple[Any]], proxies: tuple[DeviceProxy], event_tracer: ska_tango_testing.integration.TangoEventTracer, event_timeout: int, read_on_failure: bool = False)[source]
Helper for calling assertpy.assert_that for a list of expected change events from a list of device proxies.
- Parameters:
expected_events – list of tuples detailing expected events; each tuple should be formatted as such: - 4 items: (attribute_name, expected_value, previous_value, number_of_events) - 3 items using custom matcher: (attribute_name, custom_matcher, number_of_events)
proxies – device proxies to check for expected events
event_tracer – a TangoEventTracer tracking all the expected events
event_timeout – timeout for event assertion
read_on_failure – defaults to False; if set to True and upon AssertionError try once more to validate device attribute by reading
- Raises:
AssertionError – if any expected event was not received
ValueError – if expected_events formatted incorrectly