def test_matplotlib_with_title(): return PlotBlock(pd.Series([1, 2, 3]).plot(), title="Image title")
def test_matplotlib_explicit_dimensions(): return PlotBlock(pd.Series([1, 2, 3]).plot(), width="99px", height="33px")
def test_matplotlib_no_bbox_tighten(): return PlotBlock(pd.Series([1, 2, 3]).plot(), bbox_inches=None)
def test_matplotlib(): return PlotBlock(pd.Series([1, 2, 3]).plot())
def test_create_PlotBlock(): f = plt.figure() b = PlotBlock(f) assert len(b._img_data) > 0 assert b._mime_type == 'png'
def test_create_PlotBlock_with_bbox_inches_none(): f = plt.figure() b = PlotBlock(f, bbox_inches=None) assert len(b._img_data) > 0 assert b._mime_type == 'png'