matplotlib / matplotlib/pytest-mpl
decorator hash_library kwarg option precedence
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 272
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
Within the plugin.ImageComparison.compare_image_to_hash_library method, should it not be the case that the mpl_image_compare marker hash_library kwarg option should have precedence over the --mpl-hash-library CLI argument?
At the moment this isn't the case, however a similar precedence is supported for the baseline_dir decorator option e.g.,

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in pytest_mpl/plugin.py at the compare_image_to_hash_library method around lines 520-521, and trace how the decorator hash_library option and --mpl-hash-library argument are selected. Done means the decorator option takes precedence, consistently with the existing baseline_dir behavior, with regression coverage for that precedence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100