@@ -126,6 +126,7 @@ def test_simple():
126
126
pickle .dump (fig , BytesIO (), pickle .HIGHEST_PROTOCOL )
127
127
128
128
129
+ @cleanup
129
130
@image_comparison (baseline_images = ['multi_pickle' ],
130
131
extensions = ['png' ], remove_text = True )
131
132
def test_complete ():
@@ -194,6 +195,7 @@ def test_complete():
194
195
assert_equal (fig .get_label (), 'Figure with a label?' )
195
196
196
197
198
+ @cleanup
197
199
def test_no_pyplot ():
198
200
# tests pickle-ability of a figure not created with pyplot
199
201
from matplotlib .backends .backend_pdf import FigureCanvasPdf as fc
@@ -206,12 +208,14 @@ def test_no_pyplot():
206
208
pickle .dump (fig , BytesIO (), pickle .HIGHEST_PROTOCOL )
207
209
208
210
211
+ @cleanup
209
212
def test_renderer ():
210
213
from matplotlib .backends .backend_agg import RendererAgg
211
214
renderer = RendererAgg (10 , 20 , 30 )
212
215
pickle .dump (renderer , BytesIO ())
213
216
214
217
218
+ @cleanup
215
219
def test_image ():
216
220
# Prior to v1.4.0 the Image would cache data which was not picklable
217
221
# once it had been drawn.
@@ -224,6 +228,7 @@ def test_image():
224
228
pickle .dump (fig , BytesIO ())
225
229
226
230
231
+ @cleanup
227
232
def test_grid ():
228
233
from matplotlib .backends .backend_agg import new_figure_manager
229
234
manager = new_figure_manager (1000 )
@@ -237,6 +242,16 @@ def test_grid():
237
242
pickle .dump (ax , BytesIO ())
238
243
239
244
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
+
240
255
if __name__ == '__main__' :
241
256
import nose
242
257
nose .runmodule (argv = ['-s' ])
0 commit comments