def test_add_row_fails_if_too_missing_cells(): table = Table() table.set_header_row(["a", "b", "c"]) with pytest.raises(ValueError): table.add_row(["a", "b"])
def test_set_row_fails_if_too_many_cells(): table = Table() table.add_row(["a", "b", "c"]) table.add_row(["a", "b", "c"]) with pytest.raises(ValueError): table.set_row(1, ["a", "b", "c", "d"])