11
11
import matplotlib
12
12
import matplotlib .pyplot as plt
13
13
from matplotlib import patheffects
14
- from matplotlib .testing .determinism import _test_source_date_epoch , _test_determinism
14
+ from matplotlib .testing .determinism import (_test_source_date_epoch ,
15
+ _test_determinism )
15
16
from matplotlib .testing .decorators import cleanup , knownfailureif
16
17
17
18
@@ -161,7 +162,7 @@ def test_tilde_in_tempfilename():
161
162
plt .rc ('text' , usetex = True )
162
163
plt .plot ([1 , 2 , 3 , 4 ])
163
164
plt .xlabel (r'\textbf{time} (s)' )
164
- #matplotlib.verbose.set_level("debug")
165
+ # matplotlib.verbose.set_level("debug")
165
166
output_eps = os .path .join (base_tempdir , 'tex_demo.eps' )
166
167
# use the PS backend to write the file...
167
168
plt .savefig (output_eps , format = "ps" )
@@ -174,20 +175,23 @@ def test_tilde_in_tempfilename():
174
175
# do not break if this is not removeable...
175
176
print (e )
176
177
178
+
177
179
@cleanup
178
180
def test_source_date_epoch ():
179
181
"""Test SOURCE_DATE_EPOCH support for PS output"""
182
+ # SOURCE_DATE_EPOCH support is not tested with text.usetex,
183
+ # because the produced timestamp comes from ghostscript:
184
+ # %%CreationDate: D:20000101000000Z00\'00\', and this could change
185
+ # with another ghostscript version.
180
186
_test_source_date_epoch ("ps" , b"%%CreationDate: Sat Jan 1 00:00:00 2000" )
181
187
182
- # SOURCE_DATE_EPOCH support is not tested with text.usetex, because the produced
183
- # timestamp comes from ghostscript: %%CreationDate: D:20000101000000Z00\'00\',
184
- # and this could change with another ghostscript version.
185
188
186
189
@cleanup
187
190
def test_determinism_all ():
188
191
"""Test for reproducible PS output"""
189
192
_test_determinism (format = "ps" )
190
193
194
+
191
195
@cleanup
192
196
@needs_tex
193
197
@needs_ghostscript
@@ -197,7 +201,6 @@ def test_determinism_all_tex():
197
201
_test_determinism (format = "ps" )
198
202
199
203
200
-
201
204
if __name__ == '__main__' :
202
205
import nose
203
206
nose .runmodule (argv = ['-s' , '--with-doctest' ], exit = False )
0 commit comments