You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AttributeError: 'mpl_image_compare' not a registered marker #69
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...
Activity
jorgepiloto commentedon Apr 7, 2019
I am getting the same error and my pytest version is 4.0.2. Not sure how to solve this problem either 😕
dopplershift commentedon Apr 9, 2019
That's interesting. I'm not seeing this problem with pytest 4.4 and pytest-mpl 0.10.
jorgepiloto commentedon Apr 9, 2019
After adding☺️
mpl_image_compareunder the section of [tool:pytest] markers in my setup.cfg I was finally able to run successfully all the testsphobson commentedon 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:
MNT: suppress pytest-mpl warning for unregistered marker
MNT: suppress pytest-mpl warning for unregistered marker
fix(pytest): Register pytest-mpl 'mpl_image_compare' in setup.cfg to …