def test_prepare_max_column_widths_given_max_column_widths_is_string_returns_max_col_widths_string(
):
    expected_widths = "(30, 10)"
    max_column_widths = Table.prepare_max_column_widths(["a", "b", "c"],
                                                        "(30, 10)", None)
    assert max_column_widths == expected_widths
def test_prepare_max_column_widths_given_max_column_widths_is_none_returns_infinity(
):
    expected_widths = [float('inf'), float('inf'), float('inf')]
    max_column_widths = Table.prepare_max_column_widths(["a", "b", "c"], None,
                                                        None)
    assert max_column_widths == expected_widths
def test_prepare_max_column_widths_given_max_column_widths_is_set_returns_max_col_widths_as_list(
):
    expected_widths = [30, 10]
    max_column_widths = Table.prepare_max_column_widths(["a", "b", "c"],
                                                        (30, 10), None)
    assert max_column_widths == expected_widths
def test_prepare_max_column_widths_given_max_column_widths_is_none_returns_max_col_widths_of_max_length(
):
    expected_widths = [20, 20, 20]
    max_column_widths = Table.prepare_max_column_widths(["a", "b", "c"], None,
                                                        20)
    assert max_column_widths == expected_widths