def test_none_encoding(self):
     sys.__stdout__ = StreamStub(None)
     sys.__stderr__ = StreamStub(None)
     sys.__stdin__ = StreamStub('ascii')
     assert_equals(get_output_encoding(), self._get_encoding('ascii'))
     sys.__stdin__ = StreamStub(None)
     assert_not_none(get_output_encoding())
Example #2
0
 def test_none_encoding(self):
     sys.__stdout__ = StreamStub(None)
     sys.__stderr__ = StreamStub(None)
     sys.__stdin__ = StreamStub('ascii')
     assert_equals(get_output_encoding(), 'ascii')
     sys.__stdin__ = StreamStub(None)
     assert_not_none(get_output_encoding())
Example #3
0
 def test_no_encoding(self):
     sys.__stdout__ = object()
     sys.__stderr__ = object()
     sys.__stdin__ = StreamStub('ascii')
     assert_equals(get_output_encoding(), self._get_encoding('ascii'))
     sys.__stdin__ = object()
     assert_not_none(get_output_encoding())
 def test_no_encoding(self):
     sys.__stdout__ = object()
     sys.__stderr__ = object()
     sys.__stdin__ = StreamStub('ascii')
     assert_equals(get_output_encoding(), 'ascii')
     sys.__stdin__ = object()
     assert_not_none(get_output_encoding())
 def test_invalid_encoding(self):
     sys.__stdout__ = StreamStub('invalid')
     sys.__stderr__ = StreamStub('ascII')
     assert_equals(get_output_encoding(), self._get_encoding('ascII'))
 def test_valid_encoding(self):
     sys.__stdout__ = StreamStub('ASCII')
     assert_equals(get_output_encoding(), self._get_encoding('ASCII'))
Example #7
0
 def test_invalid_encoding(self):
     sys.__stdout__ = StreamStub('invalid')
     sys.__stderr__ = StreamStub('ascII')
     assert_equals(get_output_encoding(), 'ascII')
Example #8
0
 def test_valid_encoding(self):
     sys.__stdout__ = StreamStub('ASCII')
     assert_equals(get_output_encoding(), 'ASCII')