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