Open
Description
google#289 opened by @alanjds on 22 Apr 2017
The print
statement is ignoring the >>
keyword:
This test script outputs AssertionError: 0 chars printed, instead of 3
, after printing 'foo' in the stdout.
import StringIO
fake_stdout = StringIO.StringIO()
print >> fake_stdout, 'foo',
chars = fake_stdout.tell()
assert chars == 3, '%s chars printed, instead of 3' % chars