-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
pytest-xdist and capture=no fail tests when tests write non-ASCII #1693
Comments
interesting, a) its likely this should always fail - investigation is needed as to why the stdio encoding isn't ascii or a not problem when just captureing |
We could bisect, etc. but I'd imagine that's fairly academic now. I tried changing code in xdists's remote.py's final 'if name == ...' block to set os.environ['PYTHONIOENCODING'] = 'utf-8', but that didn't solve the problem. The control flow of how the tests' stdout and stderr flow through remote.py wasn't immediately obvious otherwise I would've tried something better.
|
sorry for the long delay, the only thing that does get shown should be stderr if ever |
oh, and on another note - inside of remote.py you are already past interpreter startup and can no longer affect ioencoding, you can use |
@RonnyPfannschmidt will |
@robnagler pytest-forked cant support capture=no, it must always use capture as its using the forked process stdio to communicated |
@RonnyPfannschmidt Thanks for the response. I understand that the existing implementation works this way. It seems to me you could adopt a different approach, more like ssh, which uses the same channel for stdio and out of band (OOB) communication. I suspect that the only OOB "packet" that needs to be monitored is "success" of the test. This could be a simple token that gets written to stdout only when the case succeeds. The rest of the output could be passed back to the user. |
@robnagler possibly - but thats to be implemented in pytest-forked by someone wanting to maintain it, i don't |
FYI, I had the same issue (pytest failing on this error) under BuildKite; but adding |
@RonnyPfannschmidt should we add a note in |
hello, first off thank you for the issue! python 2.x support has ended for pytest core. we've decided in #7296 to close the python-2-specific issues to free up some space in our backlog. however, in accordance to our python 2.7 and 3.4 support community patches will still be accepted to the |
py.test fails to run tests that write non-ASCII when "-s" and "-n" are specified. Similar to #573 and #1178 but a) this is a different symptom; b) this symptom manifests in the latest versions of py.test and pytest-xdist; and c) there is no open issue tracking this behavior.
pip list
of the virtual environment you are using$ pip list | grep pytest pytest (2.9.2) pytest-xdist (1.14)
Darwin Kernel Version 14.5.0: Mon Jan 11 18:48:35 PST 2016
The text was updated successfully, but these errors were encountered: