示例#1
0
def tests_for_hw4_solution1():
    u"""Тесты задачи 1"""
    assert hw4_solution1.text_analyzer("A") == {'a': 100.0}
    assert hw4_solution1.text_analyzer("ABCda") == {'a': 40.0, 'b': 20.0, 'c': 20.0, 'd': 20.0}
    assert hw4_solution1.text_analyzer("AsBCda") == {'a': 33.3,'b': 16.7, 'c': 16.7,'d': 16.7,'s': 16.7}
    assert hw4_solution1.text_analyzer("q TyU#!{}.") == {'q': 25.0,'t': 25.0,'y': 25.0,'u': 25.0}
    assert sum(hw4_solution1.text_analyzer("q TyU#!{}.").values()) == 100.0
示例#2
0
def tests_for_hw4_solution1():
    u"""Тесты задачи 1"""
    assert hw4_solution1.text_analyzer("A") == {'a': 100.0}
    assert hw4_solution1.text_analyzer("ABCda") == {
        'a': 40.0,
        'b': 20.0,
        'c': 20.0,
        'd': 20.0
    }
    assert hw4_solution1.text_analyzer("AsBCda") == {
        'a': 33.3,
        'b': 16.7,
        'c': 16.7,
        'd': 16.7,
        's': 16.7
    }
    assert hw4_solution1.text_analyzer("q TyU#!{}.") == {
        'q': 25.0,
        't': 25.0,
        'y': 25.0,
        'u': 25.0
    }
    assert sum(hw4_solution1.text_analyzer("q TyU#!{}.").values()) == 100.0
示例#3
0
def runner():
    # Starts execution of all solutions
    print INPUT_1, ">>", hw4_solution1.text_analyzer(INPUT_1)
    print INPUT_2, ">>", hw4_solution2.cut_off(INPUT_2,10)
示例#4
0
def runner():
    # Starts execution of all solutions
    print INPUT_1, ">>", hw4_solution1.text_analyzer(INPUT_1)
    print INPUT_2, ">>", hw4_solution2.cut_off(INPUT_2, 10)