Skip to content

Commit 16c0789

Browse files
committed
Fix results_dir if not specified, and update changelog
1 parent 107a82d commit 16c0789

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

CHANGES.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,19 @@
22
----------------
33

44
- Fixed use of mpl_image_compare on methods of test classes that also
5-
use setup_method. [#50]
5+
use setup_method. [#51]
6+
7+
- Make it possible to specify the directory in which to put the results
8+
from the tests using --mpl-results-path. [#39]
9+
10+
- Only import Matplotlib if the plugin is actually used. [#47]
11+
12+
- Make sure figures are closed after saving. [#46]
13+
14+
- Allow the backend to be set on a per-test basis. [#38]
15+
16+
- If test name contains slashes (normally from parameters in
17+
parametrized tests), replace with _. [#50]
618

719
0.7 (2016-11-26)
820
----------------

pytest_mpl/plugin.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ def pytest_configure(config):
7777
generate_dir = config.getoption("--mpl-generate-path")
7878
results_dir = config.getoption("--mpl-results-path") or config.getini("mpl-results-path")
7979

80+
# Note that results_dir is an empty string if not specified
81+
if not results_dir:
82+
results_dir = None
83+
8084
if generate_dir is not None:
8185
if baseline_dir is not None:
8286
warnings.warn("Ignoring --mpl-baseline-path since --mpl-generate-path is set")

0 commit comments

Comments
 (0)