@@ -127,6 +127,7 @@ def test_simple():
127127 pickle .dump (fig , BytesIO (), pickle .HIGHEST_PROTOCOL )
128128
129129
130+ @cleanup
130131@image_comparison (baseline_images = ['multi_pickle' ],
131132 extensions = ['png' ], remove_text = True )
132133def test_complete ():
@@ -195,6 +196,7 @@ def test_complete():
195196 assert_equal (fig .get_label (), 'Figure with a label?' )
196197
197198
199+ @cleanup
198200def test_no_pyplot ():
199201 # tests pickle-ability of a figure not created with pyplot
200202 from matplotlib .backends .backend_pdf import FigureCanvasPdf as fc
@@ -207,12 +209,14 @@ def test_no_pyplot():
207209 pickle .dump (fig , BytesIO (), pickle .HIGHEST_PROTOCOL )
208210
209211
212+ @cleanup
210213def test_renderer ():
211214 from matplotlib .backends .backend_agg import RendererAgg
212215 renderer = RendererAgg (10 , 20 , 30 )
213216 pickle .dump (renderer , BytesIO ())
214217
215218
219+ @cleanup
216220def test_image ():
217221 # Prior to v1.4.0 the Image would cache data which was not picklable
218222 # once it had been drawn.
@@ -225,6 +229,7 @@ def test_image():
225229 pickle .dump (fig , BytesIO ())
226230
227231
232+ @cleanup
228233def test_grid ():
229234 from matplotlib .backends .backend_agg import new_figure_manager
230235 manager = new_figure_manager (1000 )
@@ -238,6 +243,16 @@ def test_grid():
238243 pickle .dump (ax , BytesIO ())
239244
240245
246+ @cleanup
247+ def test_polar ():
248+ ax = plt .subplot (111 , polar = True )
249+ fig = plt .gcf ()
250+ result = BytesIO ()
251+ pf = pickle .dumps (fig )
252+ pickle .loads (pf )
253+ plt .draw ()
254+
255+
241256if __name__ == '__main__' :
242257 import nose
243258 nose .runmodule (argv = ['-s' ])
0 commit comments