Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'mpl_image_compare' not a registered marker #69

Closed
fredrikw opened this issue Mar 19, 2018 · 4 comments · Fixed by #83
Closed

AttributeError: 'mpl_image_compare' not a registered marker #69

fredrikw opened this issue Mar 19, 2018 · 4 comments · Fixed by #83
Assignees

Comments

@fredrikw
Copy link

When I try to use pytest-mpl on py.test version 3.4.2 I get the above error. After some googling, I realized that I could solve the problem by adding the following line as the first line in plugin.py/pytest_configure(), line 99
config.addinivalue_line('markers', "mpl_image_compare: Compares images from matplotlib")
I have not found out if there is a recent change in pytest or if something else is going on but it works for me...

@jorgepiloto
Copy link

I am getting the same error and my pytest version is 4.0.2. Not sure how to solve this problem either 😕

@astrofrog astrofrog self-assigned this Apr 7, 2019
@dopplershift
Copy link
Contributor

That's interesting. I'm not seeing this problem with pytest 4.4 and pytest-mpl 0.10.

@jorgepiloto
Copy link

After adding mpl_image_compare under the section of [tool:pytest] markers in my setup.cfg I was finally able to run successfully all the tests ☺️

@phobson
Copy link
Member

phobson commented May 14, 2019

To clarify the above fix for those still getting on their feet with pytst, the relevant section of my setup.cfg looks like this:

[tool:pytest]
markers =
    mpl_image_compare

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants