File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -222,23 +222,28 @@ def pytest_configure_node(self, node):
222222 node .workerinput ["pytest_mpl_uid" ] = node .config .pytest_mpl_uid
223223 node .workerinput ["pytest_mpl_results_dir" ] = node .config .pytest_mpl_results_dir
224224
225-
226225def pytest_configure (config ):
227226
228227 config .addinivalue_line (
229228 "markers" ,
230229 "mpl_image_compare: Compares matplotlib figures against a baseline image" ,
231230 )
232231
233- if (
234- config .getoption ("--mpl" )
235- or config .getoption ("--mpl-generate-path" ) is not None
236- or config .getoption ("--mpl-generate-hash-library" ) is not None
237- ):
232+ generate_requested = any (
233+ config .getoption (opt ) is not None
234+ for opt in (
235+ "--mpl-generate-path" ,
236+ "--mpl-generate-hash-library" ,
237+ "--mpl-generate-summary" ,
238+ )
239+ )
240+
241+ if generate_requested or config .getoption ("--mpl" ):
238242
239243 def get_cli_or_ini (name , default = None ):
240244 return config .getoption (f"--{ name } " ) or config .getini (name ) or default
241245
246+
242247 generate_dir = config .getoption ("--mpl-generate-path" )
243248 generate_hash_lib = config .getoption ("--mpl-generate-hash-library" )
244249
You can’t perform that action at this time.
0 commit comments