Have log_printer use utf8 stream.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
parent
feaa4a5f1a
commit
7e4c3142d7
2 changed files with 7 additions and 5 deletions
|
|
@ -32,7 +32,6 @@ class LogPrinterTest(unittest.TestCase):
|
|||
output = self.get_default_output()
|
||||
self.assertIn('\033[', output)
|
||||
|
||||
@unittest.skipIf(six.PY3, "Only test unicode in python2")
|
||||
def test_unicode(self):
|
||||
glyph = u'\u2022'
|
||||
|
||||
|
|
@ -42,7 +41,10 @@ class LogPrinterTest(unittest.TestCase):
|
|||
container = MockContainer(reader)
|
||||
output = run_log_printer([container])
|
||||
|
||||
self.assertIn(glyph, output.decode('utf-8'))
|
||||
if six.PY2:
|
||||
output = output.decode('utf-8')
|
||||
|
||||
self.assertIn(glyph, output)
|
||||
|
||||
|
||||
def run_log_printer(containers, monochrome=False):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue