@pytest.mark.parametrize('cls', [AsciiTable, UnixTable])
def test_simple(monkeypatch, cls):
    table_data = [
        ['Name', 'Color', 'Type'],
        ['Avocado', 'green', 'nut'],
        ['Tomato', 'red', 'fruit'],
        ['Lettuce', 'green', 'vegetable'],
    ]
    table = cls(table_data)

    assert 31 == table.table_width
    assert table.ok is True

    table_data.append(['Watermelon', 'green', 'fruit'])
    assert 34 == table.table_width
    assert table.ok is True

    monkeypatch.setattr('terminaltables.base_table.terminal_size', lambda: (34, 24))
    assert table.ok is True

    monkeypatch.setattr('terminaltables.base_table.terminal_size', lambda: (33, 24))
    assert table.ok is False
Optional Hadoop ``InputFormat`` class to parse input for
dataset/ETHPy150Open Robpol86/terminaltables/tests/test_table_width_ok.py/test_simple--crossover with--dataset/ETHPy150Open Yelp/mrjob/mrjob/job.py/MRJob.hadoop_input_format