Skip to content

Commit 3a1c153

Browse files
author
Victor
committed
Updated test for python 2.7
1 parent a6636fd commit 3a1c153

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

testing/logging/test_reporting.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -842,10 +842,13 @@ def test_log_file_unicode(testdir):
842842
)
843843
testdir.makepyfile(
844844
"""
845+
# -*- coding: utf-8 -*-
846+
from __future__ import unicode_literals
845847
import logging
848+
846849
def test_log_file():
847850
logging.getLogger('catchlog').info("Normal message")
848-
logging.getLogger('catchlog').info("\u251c")
851+
logging.getLogger('catchlog').info("")
849852
logging.getLogger('catchlog').info("Another normal message")
850853
"""
851854
)
@@ -858,7 +861,7 @@ def test_log_file():
858861
with open(log_file, encoding="utf-8") as rfh:
859862
contents = rfh.read()
860863
assert "Normal message" in contents
861-
assert "\u251c" in contents
864+
assert six.unichr(0x251c) in contents
862865
assert "Another normal message" in contents
863866

864867

0 commit comments

Comments
 (0)