pytest_cases/common_pytest.py
def analyze_parameter_set(pmark=None, argnames=None, argvalues=None, ids=None, check_nb=True):
    """
    analyzes a parameter set passed either as a pmark or as distinct
    (argnames, argvalues, ids) to extract/construct the various ids, marks, and
    values

    See also pytest.Metafunc.parametrize method, that calls in particular
    pytest.ParameterSet._for_parametrize and _pytest.python._idvalset

    :param pmark:
    :param argnames:
    :param argvalues:
    :param ids:
    :param check_nb: a bool indicating if we should raise an error if len(argnames) > 1 and any argvalue has
         a different length than len(argnames)
    :return: ids, marks, values
    """
    if pmark is not None:
        if any(a is not None for a in (argnames, argvalues, ids)):
            raise ValueError("Either provide a pmark OR the details")
        argnames = pmark.param_names
        argvalues = pmark.param_values
        ids = pmark.param_ids

    # extract all parameters that have a specific configuration (pytest.param())
    custom_pids, p_marks, p_values = extract_parameterset_info(argnames, argvalues, check_nb=check_nb)

    # get the ids by merging/creating the various possibilities
    p_ids = make_test_ids(argnames=argnames, argvalues=p_values, global_ids=ids, id_marks=custom_pids)

    return p_ids, p_marks, p_values

    analyzes a parameter set passed either as a pmark or as distinct
    (argnames, argvalues, ids) to extract/construct the various ids, marks, and
    values

    See also pytest.Metafunc.parametrize method, that calls in particular
    pytest.ParameterSet._for_parametrize and _pytest.python._idvalset

    :param pmark:
    :param argnames:
    :param argvalues:
    :param ids:
    :param check_nb: a bool indicating if we should raise an error if len(argnames) > 1 and any argvalue has
         a different length than len(argnames)
    :return: ids, marks, values
    
analyzes a parameter set passed either as a pmark or as distinct
(argnames, argvalues, ids) to extract/construct the various ids, marks, and
values


analyzes a parameter set passed either as a pmark or as distinct ( argnames argvalues ids ) to extract / construct the various ids marks and values
def analyze_parameter_set(pmark=None, argnames=None, argvalues=None, ids=None, check_nb=True):
    if pmark is not None:
        if any(a is not None for a in (argnames, argvalues, ids)):
            raise ValueError("Either provide a pmark OR the details")
        argnames = pmark.param_names
        argvalues = pmark.param_values
        ids = pmark.param_ids
    custom_pids, p_marks, p_values = extract_parameterset_info(argnames, argvalues, check_nb=check_nb)
    p_ids = make_test_ids(argnames=argnames, argvalues=p_values, global_ids=ids, id_marks=custom_pids)
    return p_ids, p_marks, p_values
def analyze_parameter_set ( pmark = None , argnames = None , argvalues = None , ids = None , check_nb = True ) : if pmark is not None : if any ( a is not None for a in ( argnames , argvalues , ids ) ) : raise ValueError ( "Either provide a pmark OR the details" ) argnames = pmark . param_names argvalues = pmark . param_values ids = pmark . param_ids custom_pids , p_marks , p_values = extract_parameterset_info ( argnames , argvalues , check_nb = check_nb ) p_ids = make_test_ids ( argnames = argnames , argvalues = p_values , global_ids = ids , id_marks = custom_pids ) return p_ids , p_marks , p_values
analyzes a parameter set passed either as a pmark or as distinct
(argnames, argvalues, ids) to extract/construct the various ids, marks, and
values
analyzes a parameter set passed either as a pmark or as distinct ( argnames argvalues ids ) to extract / construct the various ids marks and values
"""
    analyzes a parameter set passed either as a pmark or as distinct
    (argnames, argvalues, ids) to extract/construct the various ids, marks, and
    values

    See also pytest.Metafunc.parametrize method, that calls in particular
    pytest.ParameterSet._for_parametrize and _pytest.python._idvalset

    :param pmark:
    :param argnames:
    :param argvalues:
    :param ids:
    :param check_nb: a bool indicating if we should raise an error if len(argnames) > 1 and any argvalue has
         a different length than len(argnames)
    :return: ids, marks, values
    """ # extract all parameters that have a specific configuration (pytest.param()) # get the ids by merging/creating the various possibilities
ids, marks, values
ids marks values
pmark
None
argnames
None
argvalues
None
ids
None
check_nb
a bool indicating if we should raise an error if len(argnames) > 1 and any argvalue has
a different length than len(argnames)
a bool indicating if we should raise an error if len ( argnames ) > 1 and any argvalue has a different length than len ( argnames )