nose-devs / nose

nose is nicer testing for python
http://readthedocs.org/docs/nose/en/latest/
1.36k stars 397 forks source link

AttributeError: '_io.StringIO' object has no attribute 'buffer' #1098

Open glandium opened 4 years ago

glandium commented 4 years ago

In python 3, sys.stdout and sys.stderr have a buffer attribute that can be used to write raw bytes. When nose wraps them, it doesn't provide such an attribute, which breaks code that uses it.

dirkf commented 1 year ago

Python library documentation for io.TextIOBase:

buffer

The underlying binary buffer (a BufferedIOBase instance) that TextIOBase deals with. This is not part of the TextIOBase API and may not exist in some implementations.