Exemplo n.º 1
0
def tests_for_hw4_solution2():
    u"""Тесты задачи 2 ДЗ #4"""
    text = "Proin eget tortor risus."
    assert hw4_solution2.string_cut(text) == "Proin eget tortor risus."
    assert hw4_solution2.string_cut(text, 24) == "Proin eget tortor risus."
    assert hw4_solution2.string_cut(text, 23) == "Proin eget tortor..."
    assert hw4_solution2.string_cut(text, 13) == "Proin eget..."
    assert hw4_solution2.string_cut(text, 6) == "Pro..."
Exemplo n.º 2
0
def tests_for_hw4_solution2():
    u"""Тесты задачи 2 ДЗ #4"""
    text = "Proin eget tortor risus."
    assert hw4_solution2.string_cut(text) == "Proin eget tortor risus."
    assert hw4_solution2.string_cut(text, 24) == "Proin eget tortor risus."
    assert hw4_solution2.string_cut(text, 23) == "Proin eget tortor..."
    assert hw4_solution2.string_cut(text, 13) == "Proin eget..."
    assert hw4_solution2.string_cut(text, 6) == "Pro..."
Exemplo n.º 3
0
def runner():
    u"""Запускает выполнение всех задач
    """
    print INPUT_1, ">>\n", hw4_solution1.letters_fq(INPUT_1)
    print "=" * 80

    print INPUT_2_TEXT, ">>\n", hw4_solution2.string_cut(INPUT_2_TEXT)
    print INPUT_2_TEXT, ">>\n", hw4_solution2.string_cut(INPUT_2_TEXT, 10)
    print INPUT_2_TEXT, ">>\n", hw4_solution2.string_cut(INPUT_2_TEXT, 13)
Exemplo n.º 4
0
def runner():
    u"""Запускает выполнение всех задач
    """
    print INPUT_1, ">>\n", hw4_solution1.letters_fq(INPUT_1)
    print "=" * 80

    print INPUT_2_TEXT, ">>\n", hw4_solution2.string_cut(INPUT_2_TEXT)
    print INPUT_2_TEXT, ">>\n", hw4_solution2.string_cut(INPUT_2_TEXT, 10)
    print INPUT_2_TEXT, ">>\n", hw4_solution2.string_cut(INPUT_2_TEXT, 13)