Exemplo n.º 1
0
def second_field_valid_range_with_step(second_valid_range_with_step):
    """
    Fixture that yields back a :class:`~crython.field.CronField` for the "second" field created
    by a valid range of numbers with a step.
    """
    return field.second(second_valid_range_with_step)
Exemplo n.º 2
0
def second_field_valid_numeral(second_valid_numeral):
    """
    Fixture that yields back a :class:`~crython.field.CronField` for the "second" field created
    with a valid numeral.
    """
    return field.second(second_valid_numeral)
Exemplo n.º 3
0
def second_field_valid_numeral_as_str(second_valid_numeral):
    """
    Fixture that yields back a :class:`~crython.field.CronField` for the "second" field created
    with a valid numeral as a string.
    """
    return field.second(compat.str(second_valid_numeral))
Exemplo n.º 4
0
def second_field_valid_list_csv_str(second_valid_list):
    """
    Fixture that yields back a :class:`~crython.field.CronField` for the "second" field created
    with a valid list of numerals formatted as a comma separated string.
    """
    return field.second(','.join(map(str, second_valid_list)))
Exemplo n.º 5
0
def test_default_second_field_matches_all_numeral_values(second_valid_numeral):
    """
    Assert that the "second" field with the default value matches all numeral values within
    bounds inclusively.
    """
    assert field.second(field.DEFAULT_VALUE).matches(second_valid_numeral)
Exemplo n.º 6
0
def second_field_valid_range_with_step_str(second_valid_range_with_step_str):
    """
    Fixture that yields back a :class:`~crython.field.CronField` for the "second" field created
    by a valid range string with a step value.
    """
    return field.second(second_valid_range_with_step_str)
Exemplo n.º 7
0
def second_field_all_match_range_with_step_str(request):
    """
    Fixture that yields back a :class:`~crython.field.CronField` for the "second" field created
    by a valid "all matches" range string with a step value.
    """
    return field.second('*/{0}'.format(request.param))
Exemplo n.º 8
0
def second_field_valid_numeral_as_str(second_valid_numeral):
    """
    Fixture that yields back a :class:`~crython.field.CronField` for the "second" field created
    with a valid numeral as a string.
    """
    return field.second(compat.str(second_valid_numeral))
Exemplo n.º 9
0
def second_field_valid_range_with_step(second_valid_range_with_step):
    """
    Fixture that yields back a :class:`~crython.field.CronField` for the "second" field created
    by a valid range of numbers with a step.
    """
    return field.second(second_valid_range_with_step)
Exemplo n.º 10
0
def second_field_valid_numeral(second_valid_numeral):
    """
    Fixture that yields back a :class:`~crython.field.CronField` for the "second" field created
    with a valid numeral.
    """
    return field.second(second_valid_numeral)
Exemplo n.º 11
0
def test_default_second_field_matches_all_numeral_values(second_valid_numeral):
    """
    Assert that the "second" field with the default value matches all numeral values within
    bounds inclusively.
    """
    assert field.second(field.DEFAULT_VALUE).matches(second_valid_numeral)
Exemplo n.º 12
0
def second_field_valid_list_csv_str(second_valid_list):
    """
    Fixture that yields back a :class:`~crython.field.CronField` for the "second" field created
    with a valid list of numerals formatted as a comma separated string.
    """
    return field.second(','.join(map(str, second_valid_list)))
Exemplo n.º 13
0
def second_field_all_match_range_with_step_str(request):
    """
    Fixture that yields back a :class:`~crython.field.CronField` for the "second" field created
    by a valid "all matches" range string with a step value.
    """
    return field.second('*/{0}'.format(request.param))
Exemplo n.º 14
0
def second_field_valid_range_with_step_str(second_valid_range_with_step_str):
    """
    Fixture that yields back a :class:`~crython.field.CronField` for the "second" field created
    by a valid range string with a step value.
    """
    return field.second(second_valid_range_with_step_str)