Ejemplo n.º 1
0
def test_hw1(file_path):
    result_path = check_data(file_path, [validate_date, validate_line])
    with open(result_path) as res:
        for i, line in enumerate(res, start=1):
            assert line.rsplit(" ", 1)[0] in data

    assert i == len(data) - 1
Ejemplo n.º 2
0
def test_real_file():
    result_path = check_data("data.txt", [validate_date, validate_line])
    with open(result_path) as res:
        for i, _ in enumerate(res, start=1):
            pass
    assert i == 777