def test_split_lines_3():
 lines = list(split_lines([(Token.A, u'line1\nline2\n')]))
 assert (lines == [[(Token.A, u'line1')], [(Token.A, u'line2')], [(Token.A, u'')]])
 lines = list(split_lines([(Token.A, u'\n')]))
 assert (lines == [[], [(Token.A, u'')]])
 lines = list(split_lines([(Token.A, u'')]))
 assert (lines == [[(Token.A, u'')]])

def test_split_lines_3 ( ) : lines = list ( split_lines ( [ ( Token . A , u'line1\nline2\n' ) ] ) ) assert ( lines == [ [ ( Token . A , u'line1' ) ] , [ ( Token . A , u'line2' ) ] , [ ( Token . A , u'' ) ] ] ) lines = list ( split_lines ( [ ( Token . A , u'\n' ) ] ) ) assert ( lines == [ [ ] , [ ( Token . A , u'' ) ] ] ) lines = list ( split_lines ( [ ( Token . A , u'' ) ] ) ) assert ( lines == [ [ ( Token . A , u'' ) ] ] )
edge cases: inputs ending with newlines .