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

    table.outer_border = False
    assert table.column_max_width(0) == 58
    assert table.column_max_width(1) == 56
    assert table.column_max_width(2) == 60
    table.outer_border = True

    table.inner_column_border = False
    assert table.column_max_width(0) == 58
    assert table.column_max_width(1) == 56
    assert table.column_max_width(2) == 60
    table.outer_border = False
    assert table.column_max_width(0) == 60
    assert table.column_max_width(1) == 58
    assert table.column_max_width(2) == 62
    table.outer_border = True
    table.inner_column_border = True

    table.padding_left = 0
    assert table.column_max_width(0) == 59
    assert table.column_max_width(1) == 57
    assert table.column_max_width(2) == 61
    table.padding_right = 5
    assert table.column_max_width(0) == 47
    assert table.column_max_width(1) == 45
    assert table.column_max_width(2) == 49
Only load if docker libs are present
dataset/ETHPy150Open Robpol86/terminaltables/tests/test_max_width.py/test_attributes--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/dockerio.py/__virtual__