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
texttestresult should decorate the stream with _WritelnDecorator #60943
Comments
Using the unittest's texttestresult with stdout and verbosity 2 will fail because that stream doesn't have a writeln method. File "/usr/lib/python2.7/unittest/suite.py", line 108, in run It would be nice if the stream is decorated with _WritelnDecorator, as it is done on TextTestRunner. |
A test with a fix. I'm not sure if this is the way to go, because the stream in TextTestRunner will be decorated twice. |
TextTestResult could decorate a raw stream (and not redecorate an already decorated one). |
What if we check if the stream has the writeln method? |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: