# Path: terminaltables/build.py
# def flatten(table):
#     """Flatten table data into a single string with newlines.
# 
#     :param iter table: Padded and bordered table data.
# 
#     :return: Joined rows/cells.
#     :rtype: str
#     """
#     return '\n'.join(''.join(r) for r in table)


from terminaltables.build import flatten
"""Test function in module."""



def test_one_line():
    """Test with one line cells."""
    table = [
        ['>', 'Left Cell', '|', 'Center Cell', '|', 'Right Cell', '<'],
    ]
    actual = flatten(table)
    expected = '>Left Cell|Center Cell|Right Cell<'
    assert actual == expected


def test_two_line():
    """Test with two line cells."""
    table = [
        ['>', 'Left ', '|', 'Center', '|', 'Right', '<'],
        ['>', 'Cell1', '|', 'Cell2 ', '|', 'Cell3', '<'],
    ]

# Path: terminaltables/build.py
# def flatten(table):
#     """Flatten table data into a single string with newlines.
# 
#     :param iter table: Padded and bordered table data.
# 
#     :return: Joined rows/cells.
#     :rtype: str
#     """
#     return '\n'.join(''.join(r) for r in table)


# Path: tests/test_build/test_flatten.py
from terminaltables.build import flatten

"""Test function in module."""



def test_one_line():
    """Test with one line cells."""
    table = [
        ['>', 'Left Cell', '|', 'Center Cell', '|', 'Right Cell', '<'],
    ]
    actual = flatten(table)
    expected = '>Left Cell|Center Cell|Right Cell<'
    assert actual == expected


def test_two_line():
    """Test with two line cells."""
    table = [
        ['>', 'Left ', '|', 'Center', '|', 'Right', '<'],
        ['>', 'Cell1', '|', 'Cell2 ', '|', 'Cell3', '<'],
    ]

    actual = flatten(table)