-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
TST: Enable pytest-xdist #7468
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 🐑
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
It still looks longer, the nose version it matches is the one for coverage which does not use parallelism. Am I confused? |
Oh, I wasn't looking at the parallelism, just that it wasn't exceptionally slow. |
We do not run all the tests with nose. |
Also the slowdown may be related to the problem described here pytest-dev/pytest-xdist#18 |
sorry, I think I was too optimistic about merging this. |
No description provided.