15
15
import matplotlib .pyplot as plt
16
16
from matplotlib .compat import subprocess
17
17
from matplotlib .testing .compare import compare_images , ImageComparisonFailure
18
- from matplotlib .testing .decorators import _image_directories , switch_backend
18
+ from matplotlib .testing .decorators import (_image_directories , switch_backend ,
19
+ cleanup )
19
20
20
21
21
22
baseline_dir , result_dir = _image_directories (lambda : 'dummy func' )
@@ -79,6 +80,7 @@ def create_figure():
79
80
80
81
81
82
# test compiling a figure to pdf with xelatex
83
+ @cleanup (style = 'classic' )
82
84
@switch_backend ('pgf' )
83
85
def test_xelatex ():
84
86
if not check_for ('xelatex' ):
@@ -92,6 +94,7 @@ def test_xelatex():
92
94
93
95
94
96
# test compiling a figure to pdf with pdflatex
97
+ @cleanup (style = 'classic' )
95
98
@switch_backend ('pgf' )
96
99
def test_pdflatex ():
97
100
if not check_for ('pdflatex' ):
@@ -108,6 +111,7 @@ def test_pdflatex():
108
111
109
112
110
113
# test updating the rc parameters for each figure
114
+ @cleanup (style = 'classic' )
111
115
@switch_backend ('pgf' )
112
116
def test_rcupdate ():
113
117
if not check_for ('xelatex' ) or not check_for ('pdflatex' ):
@@ -137,6 +141,7 @@ def test_rcupdate():
137
141
138
142
139
143
# test backend-side clipping, since large numbers are not supported by TeX
144
+ @cleanup (style = 'classic' )
140
145
@switch_backend ('pgf' )
141
146
def test_pathclip ():
142
147
if not check_for ('xelatex' ):
@@ -155,6 +160,7 @@ def test_pathclip():
155
160
156
161
157
162
# test mixed mode rendering
163
+ @cleanup (style = 'classic' )
158
164
@switch_backend ('pgf' )
159
165
def test_mixedmode ():
160
166
if not check_for ('xelatex' ):
@@ -171,6 +177,7 @@ def test_mixedmode():
171
177
172
178
173
179
# test bbox_inches clipping
180
+ @cleanup (style = 'classic' )
174
181
@switch_backend ('pgf' )
175
182
def test_bbox_inches ():
176
183
if not check_for ('xelatex' ):
0 commit comments