assert_node_changes_to_expected_value#
- assert_node_changes_to_expected_value(daq: ziDAQServer, node: str, expected_value: Union[int, float, str], sleep_time: float = 0.005, max_repetitions: int = 200) None [source]#
Polls a node until it has the the expected value.
If the node didn’t change to the expected value within the maximum number of polls an assertion error is issued.
- Parameters:
daq (ziDAQServer) – A ziPython API session.
node (str) – path of the node that should change to expected value
expected_value (Union[int, float, str]) – value the node is expected to change to
sleep_time (float) – time in seconds to wait between requesting th value
max_repetitions (int) – max. number of loops we wait for the node to change
- Raises:
AssertionError – If the node doesn’t change to the expected value within the given time.
- Return type:
None