@@ -126,6 +126,7 @@ def test_simple():
126126 pickle .dump (fig , BytesIO (), pickle .HIGHEST_PROTOCOL )
127127
128128
129+ @cleanup
129130@image_comparison (baseline_images = ['multi_pickle' ],
130131 extensions = ['png' ], remove_text = True )
131132def test_complete ():
@@ -194,6 +195,7 @@ def test_complete():
194195 assert_equal (fig .get_label (), 'Figure with a label?' )
195196
196197
198+ @cleanup
197199def test_no_pyplot ():
198200 # tests pickle-ability of a figure not created with pyplot
199201 from matplotlib .backends .backend_pdf import FigureCanvasPdf as fc
@@ -206,12 +208,14 @@ def test_no_pyplot():
206208 pickle .dump (fig , BytesIO (), pickle .HIGHEST_PROTOCOL )
207209
208210
211+ @cleanup
209212def test_renderer ():
210213 from matplotlib .backends .backend_agg import RendererAgg
211214 renderer = RendererAgg (10 , 20 , 30 )
212215 pickle .dump (renderer , BytesIO ())
213216
214217
218+ @cleanup
215219def test_image ():
216220 # Prior to v1.4.0 the Image would cache data which was not picklable
217221 # once it had been drawn.
@@ -224,6 +228,7 @@ def test_image():
224228 pickle .dump (fig , BytesIO ())
225229
226230
231+ @cleanup
227232def test_grid ():
228233 from matplotlib .backends .backend_agg import new_figure_manager
229234 manager = new_figure_manager (1000 )
@@ -237,6 +242,16 @@ def test_grid():
237242 pickle .dump (ax , BytesIO ())
238243
239244
245+ @cleanup
246+ def test_polar ():
247+ ax = plt .subplot (111 , polar = True )
248+ fig = plt .gcf ()
249+ result = BytesIO ()
250+ pf = pickle .dumps (fig )
251+ pickle .loads (pf )
252+ plt .draw ()
253+
254+
240255if __name__ == '__main__' :
241256 import nose
242257 nose .runmodule (argv = ['-s' ])
0 commit comments