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

Register mpl_image_compare marker to remove PytestUnknownMarkWarning #323

Merged

Conversation

weiji14
Copy link
Member

@weiji14 weiji14 commented Aug 23, 2019

Description of proposed changes

Supresses the annoying warning that @pytest.mark.mpl_image_compare emits when running make test because it isn't registered properly.

Original warning was:

/home/.../envs/pygmt/lib/python3.7/site-packages/_pytest/mark/structures.py:324
  /home/.../envs/pygmt/lib/python3.7/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.mpl_image_compare - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    PytestUnknownMarkWarning,

-- Docs: https://docs.pytest.org/en/latest/warnings.html

This quickfix suppresses that warning until it is resolved upstream at matplotlib/pytest-mpl#69 by merging in matplotlib/pytest-mpl#83. See also https://docs.pytest.org/en/latest/mark.html#raising-errors-on-unknown-marks

Patches #78

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Supresses the annoying warning that @pytest.mark.mpl_image_compare emits because it isn't registered properly. See relevant pytest documentation at https://docs.pytest.org/en/latest/mark.html#raising-errors-on-unknown-marks
Copy link
Member

@seisman seisman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@seisman seisman merged commit 34f5291 into GenericMappingTools:master Aug 28, 2019
@weiji14 weiji14 deleted the register_mpl_image_compare branch August 28, 2019 03:27
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 this pull request may close these issues.

2 participants