Skip to content

Generate summary when (only) --mpl-generate-summary passed #235

Description

@kavanase

Hi!
This is an incredibly useful package; we use it extensively in our tests for doped and ShakeNBreak; so thank you very much for building and maintaining!

Just a question/suggestion; when running pytest --mpl-generate-summary=html no summary file is created, but it is with pytest --mpl --mpl-generate-summary=html, because the catch here (https://github.com/matplotlib/pytest-mpl/blob/29fd89095ced454e1f82007aeb592268a430aba0/pytest_mpl/plugin.py#L226C1-L230C7) accounts for --mpl, --mpl-generate-path and --mpl-generate-hash-library. As this is one of the commonly used options, maybe it would be good for it to have similar behaviour to --mpl-generate-path, not needing --mpl to also be specified?
(Obvs a 'me' problem, but personally I always forget I also need --mpl when trying to use the summary option, as I don't use it when generating the images --mpl-generate-path, and takes me a little while to figure out why it's apparently not working).

Maybe something like checking if any "mpl-generate" option has been specified could be used here?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions