From 3a1c15316b55656ed57355dec27d223e378bf481 Mon Sep 17 00:00:00 2001 From: Victor Date: Sat, 30 Jun 2018 16:11:20 +0200 Subject: [PATCH] Updated test for python 2.7 --- testing/logging/test_reporting.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/testing/logging/test_reporting.py b/testing/logging/test_reporting.py index 1f961d94a..925821d2e 100644 --- a/testing/logging/test_reporting.py +++ b/testing/logging/test_reporting.py @@ -842,10 +842,13 @@ def test_log_file_unicode(testdir): ) testdir.makepyfile( """ + # -*- coding: utf-8 -*- + from __future__ import unicode_literals import logging + def test_log_file(): logging.getLogger('catchlog').info("Normal message") - logging.getLogger('catchlog').info("\u251c") + logging.getLogger('catchlog').info("├") logging.getLogger('catchlog').info("Another normal message") """ ) @@ -858,7 +861,7 @@ def test_log_file_unicode(testdir): with open(log_file, encoding="utf-8") as rfh: contents = rfh.read() assert "Normal message" in contents - assert "\u251c" in contents + assert six.unichr(0x251c) in contents assert "Another normal message" in contents