Skip to content

TST: Enable pytest-xdist #7468

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 1 commit into from
Dec 2, 2016
Merged

Conversation

Kojoley
Copy link
Member

@Kojoley Kojoley commented Nov 16, 2016

No description provided.

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

@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

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

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
Copy link
Member

Choose a reason for hiding this comment

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

Will this affect the determinism tests?

Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I think you are right 🐑

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

Copy link
Member

Choose a reason for hiding this comment

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

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

@tacaswell
Copy link
Member

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

@QuLogic
Copy link
Member

QuLogic commented Nov 17, 2016

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

@Kojoley
Copy link
Member Author

Kojoley commented Nov 17, 2016

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.

@Kojoley
Copy link
Member Author

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
@tacaswell
Copy link
Member

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants