def test_cell_style(): table = Table((0, 0), 10, 10) style = table.new_cell_style('extra', textcolor=199) style = table.get_cell_style('extra') assert style['textcolor'] == 199 with pytest.raises(KeyError): table.get_cell_style('extraextra')
def test_cell_style(): table = Table((0, 0), 10, 10) style = table.new_cell_style("extra", textcolor=199) style = table.get_cell_style("extra") assert style["textcolor"] == 199 with pytest.raises(KeyError): table.get_cell_style("extraextra")
def test_init(): table = Table((0, 0), 10, 10, default_grid=False) assert bool(table) is True style = table.get_cell_style('default') for border in ['left', 'right', 'top', 'bottom']: assert style[border]['status'] is False table = Table((0, 0), 10, 10, default_grid=True) style = table.get_cell_style('default') for border in ['left', 'right', 'top', 'bottom']: assert style[border]['status'] is True
def test_init(): table = Table((0, 0), 10, 10, default_grid=False) assert bool(table) is True style = table.get_cell_style("default") for border in ["left", "right", "top", "bottom"]: assert style[border]["status"] is False table = Table((0, 0), 10, 10, default_grid=True) style = table.get_cell_style("default") for border in ["left", "right", "top", "bottom"]: assert style[border]["status"] is True