TST: Enable pytest-xdist #7468

Merged
merged 1 commit into from Dec 2, 2016

Conversation

Projects
None yet
3 participants
Member

Kojoley commented Nov 16, 2016

No description provided.

@Kojoley Kojoley TST: Enable pytest-xdist
cecf4a6

Kojoley added the Testing label Nov 16, 2016

Kojoley added this to the 2.1 (next point release) milestone Nov 16, 2016

Kojoley referenced this pull request Nov 16, 2016

Open

Migration to Py.test testing framework #6731

28 of 39 tasks complete
@QuLogic

Good to see test times down to about the same as nose.

+ # https://github.com/pytest-dev/pytest/issues/920
+ # https://github.com/pytest-dev/pytest/issues/1075
+ export PYTHONHASHSEED=$(shuf -i 1-4294967295 -n 1)
+ echo PYTHONHASHSEED=$PYTHONHASHSEED
@QuLogic

QuLogic Nov 17, 2016

Member

Will this affect the determinism tests?

@tacaswell

tacaswell Nov 17, 2016

Owner

Aren't the tests that really care about this run in a shell-call with their own seeds set?

@QuLogic

QuLogic Nov 17, 2016

Member

I don't see it set/unset PYTHONHASHSEED, so wouldn't it be inherited?

@tacaswell

tacaswell Nov 17, 2016

Owner

Yeah, I think you are right 🐑

@Kojoley

Kojoley Nov 17, 2016

Member

Well, I have find out that xdist collection problem is triggered by test_mathtext.py, but I do not know what exactly, maybe globals() injection magic or something else. I think the best option for us is to rewrite test_mathtext to pytest fixtures and forget about this xdist issue.

@QuLogic

QuLogic Nov 18, 2016

Member

Hmm, that definitely is weird; is there a way to parametrize the fileename passed to the image_comparison decorator?

Owner

tacaswell commented Nov 17, 2016

It still looks longer, the nose version it matches is the one for coverage which does not use parallelism. Am I confused?

Member

QuLogic commented Nov 17, 2016

Oh, I wasn't looking at the parallelism, just that it wasn't exceptionally slow.

Member

Kojoley commented Nov 17, 2016 edited

We do not run all the tests with nose. test_axes takes 2 mins on my machine with -n 2. IIRC nose builds previously had taken about 12 mins, what is close to the build time we see on pytest build here.

Member

Kojoley commented Nov 17, 2016

Also the slowdown may be related to the problem described here pytest-dev/pytest-xdist#18

@tacaswell tacaswell merged commit 45c64e2 into matplotlib:master Dec 2, 2016

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 61.987%
Details
Owner

tacaswell commented Dec 2, 2016

sorry, I think I was too optimistic about merging this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment