From 3bc70b178f1151d636b691c6d80ebcd309680691 Mon Sep 17 00:00:00 2001 From: Bill Little Date: Mon, 28 May 2018 14:04:50 +0100 Subject: [PATCH] add citation graphic test --- lib/iris/tests/test_plot.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/lib/iris/tests/test_plot.py b/lib/iris/tests/test_plot.py index dcb3622e5d2..0a8e0e44f83 100644 --- a/lib/iris/tests/test_plot.py +++ b/lib/iris/tests/test_plot.py @@ -1,4 +1,4 @@ -# (C) British Crown Copyright 2010 - 2017, Met Office +# (C) British Crown Copyright 2010 - 2018, Met Office # # This file is part of Iris. # @@ -938,5 +938,28 @@ def test_plot_tmerc(self): self.check_graphic() +@tests.skip_plot +class TestPlotCitation(tests.GraphicsTest): + def setUp(self): + super(TestPlotCitation, self).setUp() + self.figure = plt.figure() + self.axes = self.figure.gca() + self.text = ('Lorem ipsum dolor sit amet, consectetur adipiscing ' + 'elit, sed do eiusmod tempor incididunt ut labore et ' + 'dolore magna aliqua.') + + def test(self): + iplt.citation(self.text) + self.check_graphic() + + def test_figure(self): + iplt.citation(self.text, figure=self.figure) + self.check_graphic() + + def test_axes(self): + iplt.citation(self.text, axes=self.axes) + self.check_graphic() + + if __name__ == "__main__": tests.main()