Skip to content

Commit

Permalink
add citation graphic test
Browse files Browse the repository at this point in the history
  • Loading branch information
bjlittle committed May 28, 2018
1 parent eaeda68 commit 3bc70b1
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion lib/iris/tests/test_plot.py
Original file line number Diff line number Diff line change
@@ -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.
#
Expand Down Expand Up @@ -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()

0 comments on commit 3bc70b1

Please sign in to comment.