def test_close_figure_using_matplotlib(self): # check that matplotlib callback to `_on_close` is working fine fig = BlittedFigure() fig.create_figure() assert fig.figure is not None # Close using matplotlib, similar to using gui fig.figure.canvas.close_event() self._assert_figure_state_after_close(fig)
def test_title_lenght(): f = BlittedFigure() f.title = "Test" * 50 nose.tools.assert_less(max( [len(line) for line in f.title.split("\n")]), 61)
def test_close_figure_using_close_method(self): fig = BlittedFigure() fig.create_figure() assert fig.figure is not None fig.close() self._assert_figure_state_after_close(fig)
def test_figure_title_length(): f = BlittedFigure() f.title = "Test" * 50 assert max([len(line) for line in f.title.split("\n")]) < 61
def test_title_length(): f = BlittedFigure() f.title = "Test" * 50 assert max( [len(line) for line in f.title.split("\n")]) < 61
def test_title_length(): f = BlittedFigure() f.title = "Test" * 50 nose.tools.assert_less(max([len(line) for line in f.title.split("\n")]), 61)