8000 Fix tests against pytest 3.1 by QuLogic · Pull Request #8655 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Fix tests against pytest 3.1 #8655

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

Merged
merged 2 commits into from
May 23, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix check for pytest-marked extensions.
All because of the mixed subplots test which marks one extension as
xfail. This was technically not checked correctly, but ended up with the
same result of the 'svg' extension being treated as xfail.
  • Loading branch information
QuLogic committed May 23, 2017
commit 05b88ad369a8d38fb14c2b03f5f0dc15de2e173f
6 changes: 5 additions & 1 deletion lib/matplotlib/testing/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,11 @@ def _xfail_if_format_is_uncomparable(extension):


def _mark_xfail_if_format_is_uncomparable(extension):
will_fail = extension not in comparable_formats()
if isinstance(extension, six.string_types):
will_fail = extension not in comparable_formats()
else:
# Extension might be a pytest marker instead of a plain string.
will_fail = extension.args[0] not in comparable_formats()
if will_fail:
fail_msg = 'Cannot compare %s files on this system' % extension
import pytest
Expand Down
0