You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|Default: ``baseline/`` *(relative to the test file)*
89
89
90
90
The directory containing the baseline images that will be compared to the test figures.
91
-
The kwarg option (``baseline_dir``) is relative to the test file, while the CLI option (``--mpl-baseline-path``) is relative to where pytest was run.
91
+
The kwarg option (``baseline_dir``) is relative to the test file, while the CLI option (``--mpl-baseline-path``) and INI option (``mpl-baseline-path``) are relative to where pytest was run.
92
92
Absolute paths can also be used.
93
93
If the directory does not exist, it will be created along with any missing parent directories.
94
94
@@ -160,7 +160,7 @@ If you specify a filename that has an extension other than ``png``, you must als
160
160
Whether to include the module name in the filename
The file containing the baseline hashes that will be compared to the test figures.
198
-
Both the kwarg option (``hash_library``) and the CLI option (``--mpl-hash-library``) are relative to the test file.
199
-
In this case, the CLI option takes precedence over the kwarg option.
198
+
The kwarg option (``hash_library``) is relative to the test file, while the INI option (``mpl-hash-library``) is relative to where pytest was run.
200
199
The file must be a JSON file in the same format as one generated by ``--mpl-generate-hash-library``.
201
200
If its directory does not exist, it will be created along with any missing parent directories.
202
201
202
+
.. attention::
203
+
204
+
For backwards compatibility, the CLI option (``--mpl-hash-library``) is relative to the test file.
205
+
Also, the CLI option takes precedence over the kwarg option, but the kwarg option takes precedence over the INI option as usual.
206
+
203
207
Configuring this option disables baseline image comparison.
204
208
If you want to enable both hash and baseline image comparison, which we call :doc:`"hybrid mode" <hybrid_mode>`, you must explicitly set the :ref:`baseline directory configuration option <baseline-dir>`.
205
209
@@ -222,8 +226,8 @@ Adjusting these options *may* allow tests to pass across a range of Matplotlib a
222
226
RMS tolerance
223
227
-------------
224
228
|**kwarg**: ``tolerance=<value>``
225
-
|**CLI**: ---
226
-
|**INI**: ---
229
+
|**CLI**: ``--mpl-default-tolerance=<value>``
230
+
|**INI**: ``mpl-default-tolerance = <value>``
227
231
|Default: ``2``
228
232
229
233
The maximum RMS difference between the result image and the baseline image before the test fails.
@@ -306,8 +310,8 @@ A dictionary of keyword arguments to pass to :func:`matplotlib.pyplot.savefig`.
306
310
Matplotlib style
307
311
----------------
308
312
|**kwarg**: ``style=<name>``
309
-
|**CLI**: ---
310
-
|**INI**: ---
313
+
|**CLI**: ``--mpl-default-style=<name>``
314
+
|**INI**: ``mpl-default-style = <name>``
311
315
|Default: ``"classic"``
312
316
313
317
The Matplotlib style to use when saving the figure.
@@ -336,8 +340,8 @@ See the :func:`matplotlib.style.context` ``style`` documentation for the options
336
340
Matplotlib backend
337
341
------------------
338
342
|**kwarg**: ``backend=<name>``
339
-
|**CLI**: ---
340
-
|**INI**: ---
343
+
|**CLI**: ``--mpl-default-backend=<name>``
344
+
|**INI**: ``mpl-default-backend = <name>``
341
345
|Default: ``"agg"``
342
346
343
347
The Matplotlib backend to use when saving the figure.
0 commit comments