Ejemplo n.º 1
0
 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())
Ejemplo n.º 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())
Ejemplo n.º 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())
Ejemplo n.º 4
0
 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())
Ejemplo n.º 5
0
 def test_invalid_encoding(self):
     sys.__stdout__ = StreamStub('invalid')
     sys.__stderr__ = StreamStub('ascII')
     assert_equals(get_output_encoding(), self._get_encoding('ascII'))
Ejemplo n.º 6
0
 def test_valid_encoding(self):
     sys.__stdout__ = StreamStub('ASCII')
     assert_equals(get_output_encoding(), self._get_encoding('ASCII'))
Ejemplo n.º 7
0
 def test_invalid_encoding(self):
     sys.__stdout__ = StreamStub('invalid')
     sys.__stderr__ = StreamStub('ascII')
     assert_equals(get_output_encoding(), 'ascII')
Ejemplo n.º 8
0
 def test_valid_encoding(self):
     sys.__stdout__ = StreamStub('ASCII')
     assert_equals(get_output_encoding(), 'ASCII')