Skip to content

Convert a few test files to Pytest #7318

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 4 commits into from
Oct 22, 2016
Merged

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Oct 21, 2016

This limited conversion of tests serves two purposes: 1) see how useful nose2pytest is; 2) fix the warnings about yield-based fixtures. Note that because of the conversion to parametrize, these files can no longer be run using nose (like test_category.py.)

This PR is going to conflict with #7316, so don't merge this one until that's in master too.

@QuLogic QuLogic added this to the 2.1 (next point release) milestone Oct 21, 2016
@Kojoley
Copy link
Member

Kojoley commented Oct 21, 2016

Is np.testing.assert_equal can be freely replaced with == operator?

@QuLogic
Copy link
Member Author

QuLogic commented Oct 21, 2016

In the changed lines, it's only comparing two numbers; I'm not sure about the general case.

@QuLogic
Copy link
Member Author

QuLogic commented Oct 22, 2016

Oh, I missed the other from numpy.testing import assert_equal in test_animation.py. In that file, all the assertions are against simple Python types that should Just Work, except the one Figure comparison. But I don't think NumPy does anything special for it.

Copy link
Member

@Kojoley Kojoley left a comment

Choose a reason for hiding this comment

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

LGTM

@NelleV NelleV merged commit 73ed804 into matplotlib:master Oct 22, 2016
@QuLogic QuLogic deleted the pytest-yield branch October 22, 2016 20:46
@rcomer rcomer mentioned this pull request Oct 16, 2022
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants