Пример #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)
Пример #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)
Пример #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))
Пример #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)))
Пример #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)
Пример #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)
Пример #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))
Пример #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))
Пример #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)
Пример #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)
Пример #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)
Пример #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)))
Пример #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))
Пример #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)