nose-devs / nose

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

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

Open glandium opened 5 years ago

glandium commented 5 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 2 years 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.