@pytest.mark.parametrize(argnames=['sensor', 'node_id', 'timeout'], argvalues=[[lazy_fixture('capacitive_sensor'), NodeId.pipette_left, 2], [lazy_fixture('pressure_sensor'), NodeId.pipette_right, 3]])
async def test_debug_poll(mock_messenger: mock.AsyncMock, sensor: sensor_abc.AbstractAdvancedSensor, node_id: NodeId, timeout: int) -> None:
    'Test for debug poll.'
    async with sensor.bind_output(mock_messenger, node_id, SensorOutputBinding.report):
        for i in range(2):
            with patch.object(sensor._scheduler, '_wait_for_response', new=AsyncMock(return_value=SensorDataType.build(50))):
                data = (await sensor.get_report(node_id, mock_messenger, timeout))
                assert (data == SensorDataType.build(Int32Field(50)))
    mock_messenger.send.assert_called_with(node_id=node_id, message=BindSensorOutputRequest(payload=BindSensorOutputRequestPayload(sensor=SensorTypeField(sensor._sensor_type), sensor_id=SensorIdField(SensorId.S0), binding=SensorOutputBindingField(SensorOutputBinding.none))))
Test for debug poll.
@pytest.mark.parametrize(argnames=['sensor', 'node_id', 'timeout'], argvalues=[[lazy_fixture('capacitive_sensor'), NodeId.pipette_left, 2], [lazy_fixture('pressure_sensor'), NodeId.pipette_right, 3]])
async def test_debug_poll(mock_messenger: mock.AsyncMock, sensor: sensor_abc.AbstractAdvancedSensor, node_id: NodeId, timeout: int) -> None:
    
    async with sensor.bind_output(mock_messenger, node_id, SensorOutputBinding.report):
        for i in range(2):
            with patch.object(sensor._scheduler, '_wait_for_response', new=AsyncMock(return_value=SensorDataType.build(50))):
                data = (await sensor.get_report(node_id, mock_messenger, timeout))
                assert (data == SensorDataType.build(Int32Field(50)))
    mock_messenger.send.assert_called_with(node_id=node_id, message=BindSensorOutputRequest(payload=BindSensorOutputRequestPayload(sensor=SensorTypeField(sensor._sensor_type), sensor_id=SensorIdField(SensorId.S0), binding=SensorOutputBindingField(SensorOutputBinding.none))))