@@ -293,14 +293,18 @@ In order to enforce that the output is deterministic, you will need to do the fo
293293PNG
294294^^^
295295
296- For PNG files, the output can be made deterministic by setting::
296+ For PNG files, the output can be made deterministic by setting:
297+
298+ .. code :: python
297299
298300 @pytest.mark.mpl_image_compare (savefig_kwargs = {' metadata' : {" Software" : None }})
299301
300302 PDF
301303^^^
302304
303- For PDF files, the output can be made deterministic by setting::
305+ For PDF files, the output can be made deterministic by setting:
306+
307+ .. code :: python
304308
305309 @pytest.mark.mpl_image_compare (savefig_kwargs = {' format' : ' pdf' ,
306310 ' metadata' : {" Creator" : None ,
@@ -310,13 +314,17 @@ For PDF files, the output can be made deterministic by setting::
310314 EPS
311315^^^
312316
313- For PDF files, the output can be made deterministic by setting::
317+ For PDF files, the output can be made deterministic by setting:
318+
319+ .. code :: python
314320
315321 @pytest.mark.mpl_image_compare (savefig_kwargs = {' format' : ' pdf' ,
316322 ' metadata' : {" Creator" : " test" })
317323
318324and in addition you will need to set the SOURCE_DATE_EPOCH environment variable to
319- a constant value (this is a unit timestamp)::
325+ a constant value (this is a unit timestamp):
326+
327+ .. code:: python
320328
321329 os.environ[' SOURCE_DATE_EPOCH' ] = ' 1680254601'
322330
@@ -325,11 +333,15 @@ You could do this inside the test.
325333SVG
326334^^^
327335
328- For SVG files, the output can be made deterministic by setting::
336+ For SVG files, the output can be made deterministic by setting:
337+
338+ .. code:: python
329339
330340 @ pytest.mark.mpl_image_compare(savefig_kwargs = {' metadata' : ' {"Date": None}} )
331341
332- and in addition, you should make sure the following rcParam is set to a constant string::
342+ and in addition, you should make sure the following rcParam is set to a constant string:
343+
344+ .. code:: python
333345
334346 plt.rcParams[' svg.hashsalt' ] = ' test'
335347
0 commit comments