@mock_streams('stdout')
def test_puts_with_encoding_type_none_output():
 s = u'string!'
 output.user = True
 sys.stdout.encoding = None
 puts(s, show_prefix=False)
 eq_(sys.stdout.getvalue(), (s + '\n'))

@ mock_streams ( 'stdout' ) def test_puts_with_encoding_type_none_output ( ) : s = u'string!' output . user = True sys . stdout . encoding = None puts ( s , show_prefix = False ) eq_ ( sys . stdout . getvalue ( ) , ( s + '\n' ) )
puts() should print unicode output without a stream encoding .