File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,8 @@ def pytest_addoption(parser):
140
140
group .addoption ('--mpl-results-path' , help = results_path_help , action = 'store' )
141
141
parser .addini ('mpl-results-path' , help = results_path_help )
142
142
143
- results_always_help = "Always generate result images, not just for failed tests."
143
+ results_always_help = ("Always generate result images, not just for failed tests. "
144
+ "This option is automatically applied when generating a HTML summary." )
144
145
group .addoption ('--mpl-results-always' , action = 'store_true' ,
145
146
help = results_always_help )
146
147
parser .addini ('mpl-results-always' , help = results_always_help )
@@ -271,6 +272,9 @@ def __init__(self,
271
272
if len (unsupported_formats ) > 0 :
272
273
raise ValueError (f"The mpl summary type(s) '{ sorted (unsupported_formats )} ' "
273
274
"are not supported." )
275
+ # Ignore `results_always` and always save result images for HTML output
276
+ if generate_summary & {'html' , 'basic-html' }:
277
+ results_always = True
274
278
self .generate_summary = generate_summary
275
279
self .results_always = results_always
276
280
You can’t perform that action at this time.
0 commit comments