Skip to content

Use parametrize instead of yield for tests in units and io.votable - #5682

Merged
mhvk merged 3 commits into
astropy:masterfrom
mhvk:pytest-3-do-not-use-yield
Jan 9, 2017
Merged

mhvk merged 3 commits into
astropy:masterfrom
mhvk:pytest-3-do-not-use-yield

Conversation

@mhvk

@mhvk mhvk commented Jan 8, 2017

Copy link
Copy Markdown
Contributor

This follows on #5678 in ensuring that we do not use yield for running series of tests, but rather use pytest.mark.parametrize, as the former is deprecated in pytest >=3. With #5678 taking care of wcs, this should remove all usage in astropy.

Note: I labelled it as a bug and set the milestone to 1.3.1 since recent versions of astropy should work with pytest >=3.

@kelle - would you be able to have a quick look?

@kelle
kelle self-requested a review January 9, 2017 15:06

@kelle kelle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I've never done proper code review before but this looks good to me! I think one other person should look at it though.

@mhvk

mhvk commented Jan 9, 2017

Copy link
Copy Markdown
Contributor Author

OK, thanks! @pllim - great if you can have a second look; it should be ready.

@mhvk

mhvk commented Jan 9, 2017

Copy link
Copy Markdown
Contributor Author

I'm convinced enough by this to go ahead and merge, so that at least our test suite is pytest 3.x compatible.

@mhvk
mhvk merged commit 1fe7600 into astropy:master Jan 9, 2017
@mhvk
mhvk deleted the pytest-3-do-not-use-yield branch January 9, 2017 21:47

@pllim pllim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If it passes, it's good to me. I was traveling, hence the late comment. I apologize for any inconvenience caused.

@mhvk

mhvk commented Jan 10, 2017

Copy link
Copy Markdown
Contributor Author

@pllim - no apologies needed - it really is just my impatience (and trying to minimize the number of things "something should be done with").

bsipocz pushed a commit that referenced this pull request Feb 14, 2017
Use parametrize instead of yield for tests in units and io.votable
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.

3 participants