def METHOD_NAME(u, qdac):  # noqa
    # -----------------------------------------------------------------------
    with pytest.raises(ValueError) as error:
        qdac.ch01.dc_constant_V(u)
    # -----------------------------------------------------------------------
    assert f'{u} is invalid' in repr(error)