Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pytest_mpl/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ def pytest_addoption(parser):
group.addoption('--mpl-results-path', help=results_path_help, action='store')
parser.addini('mpl-results-path', help=results_path_help)

results_always_help = "Always generate result images, not just for failed tests."
results_always_help = ("Always generate result images, not just for failed tests. "
"This option is automatically applied when generating a HTML summary.")
group.addoption('--mpl-results-always', action='store_true',
help=results_always_help)
parser.addini('mpl-results-always', help=results_always_help)
Expand Down Expand Up @@ -271,6 +272,9 @@ def __init__(self,
if len(unsupported_formats) > 0:
raise ValueError(f"The mpl summary type(s) '{sorted(unsupported_formats)}' "
"are not supported.")
# Ignore `results_always` and always save result images for HTML output
if generate_summary & {'html', 'basic-html'}:
results_always = True
self.generate_summary = generate_summary
self.results_always = results_always

Expand Down