-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Description
Applicable versions where sys.stdout.buffer should exist and be a bytestream:
- python3.x
import sys
def test(capsys):
sys.stdout.buffer.write(b'hi\n')
assert capsys.readouterr()[0] == 'hi\n'
$ py.test test.py
============================= test session starts ==============================
platform linux -- Python 3.4.3, pytest-2.8.7, py-1.4.31, pluggy-0.3.1
rootdir: /home/asottile/workspace/cheetah_lint, inifile:
collected 1 items
test.py F
=================================== FAILURES ===================================
_____________________________________ test _____________________________________
capsys = <_pytest.capture.CaptureFixture object at 0x7f15ca2cd320>
def test(capsys):
> sys.stdout.buffer.write(b'hi\n')
E AttributeError: '_io.StringIO' object has no attribute 'buffer'
test.py:5: AttributeError
=========================== 1 failed in 0.01 seconds ===========================
Metadata
Metadata
Assignees
Labels
No labels