Skip to content

Add Py.test testing framework support #6730

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 10 commits into from
Aug 23, 2016

Conversation

Kojoley
Copy link
Member

@Kojoley Kojoley commented Jul 12, 2016

This PR is part of preparation for migration to pytest

@Kojoley
Copy link
Member Author

Kojoley commented Jul 12, 2016

Missed several other places, will update PR soon.

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Jul 12, 2016
@story645
Copy link
Member

Is this a continuation of #5325?

@tacaswell
Copy link
Member

Also, please be aware of https://github.com/matplotlib/pytest-mpl

@Kojoley Kojoley changed the title Move out from nose specific things in tests Add Py.test testing framework support Jul 23, 2016
@Kojoley Kojoley force-pushed the improve-tests branch 20 times, most recently from e8a4d60 to 32fc6b9 Compare July 28, 2016 16:09
@Kojoley Kojoley force-pushed the improve-tests branch 2 times, most recently from 30bbacc to 0b30109 Compare July 31, 2016 10:57
@Kojoley Kojoley force-pushed the improve-tests branch 2 times, most recently from c3dc84e to 6931c9e Compare August 4, 2016 10:24
…test`

`do_test` function variables are changed by loop where function was creates.
It will work as you expect only if you call yielded function immediately.
@Kojoley Kojoley force-pushed the improve-tests branch 2 times, most recently from 745d683 to 391e981 Compare August 21, 2016 11:58
@Kojoley
Copy link
Member Author

Kojoley commented Aug 21, 2016

Pytest 3.0 released with this change:

yield-based tests are considered deprecated and will be removed in pytest-4.0.

😕

The bug will not be fixed in pytest because generator functions are
deprecated since pytest 3.0 release.
@Kojoley
Copy link
Member Author

Kojoley commented Aug 21, 2016

Coverage problem is because of if [[ $NOSE_ARGS="--with-coverage" ]]; then in .travis.yml. The expression should be either [ a=b ] or [[ a==b ]].

@Kojoley
Copy link
Member Author

Kojoley commented Aug 21, 2016

PR is now ready for review and merge.

Key notes:

@tacaswell
Copy link
Member

It looks like pytest is finding 5 more tests than nose so that is probably a victory.

It looks like pep8 is being run by pytest on travis, but not on appveyor, but that is ok for now.

There is a big CI hit time wise for this and we will have to (soon) pick some of the nose builds to drop.

@tacaswell tacaswell merged commit 84f471e into matplotlib:master Aug 23, 2016
@Kojoley
Copy link
Member Author

Kojoley commented Aug 23, 2016

It looks like pep8 is being run by pytest on travis, but not on appveyor, but that is ok for now.

I made this intentionally because we have separated pep8 only build on travis so there is no need to run them on all appveyor builds. Or I was wrong?

@tacaswell
Copy link
Member

If anything pep8 should be skipped by travis pytest build. According to the handy output, it is only 45s which is not a big deal on top of our total runtime.

@jenshnielsen
Copy link
Member

As far as I remember the main reason for splitting pep8 out in a separate build is not so much runtime but making it simpler to spot failures that are due to pep8 only

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.

6 participants