Exemplo n.º 1
0
def test_remove_preheader_and_no_delim():
    lines = [(1, 'preheader'),
             (2, '1 2 3'),
             (3, 'nodelim')]
    lines = wcut.suppress_preheader_lines(lines, 2)
    lines = wcut.suppress_no_delim_lines(lines, ' ')
    result = list(lines)
    expected = [(2, '1 2 3')]
    assert result == expected
Exemplo n.º 2
0
def test_remove_preheader_with_preheader():
    lines = [(1, 'preheader'),
             (2, '1 2 3')]
    result = list(wcut.suppress_preheader_lines(lines, 2))
    expected = [(2, '1 2 3')]
    assert result == expected