From 3fadaa3a0918199a20c1734a49ff40baf0ef3645 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 17 Jun 2019 18:18:01 -0400 Subject: Fix unicode for Py2 --- coverage/html.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'coverage') diff --git a/coverage/html.py b/coverage/html.py index 21bb183c..0f21426b 100644 --- a/coverage/html.py +++ b/coverage/html.py @@ -219,15 +219,15 @@ class HtmlReporter(object): else: tok_html = escape(tok_text) or ' ' html.append( - '{}'.format(tok_type, tok_html) + u'{}'.format(tok_type, tok_html) ) ldata.html = ''.join(html) if ldata.short_annotations: # 202F is NARROW NO-BREAK SPACE. # 219B is RIGHTWARDS ARROW WITH STROKE. - ldata.annotate = ",   ".join( - "{} ↛ {}".format(ldata.number, d) + ldata.annotate = u",   ".join( + u"{} ↛ {}".format(ldata.number, d) for d in ldata.short_annotations ) else: @@ -238,10 +238,10 @@ class HtmlReporter(object): if len(longs) == 1: ldata.annotate_long = longs[0] else: - ldata.annotate_long = "{:d} missed branches: {}".format( + ldata.annotate_long = u"{:d} missed branches: {}".format( len(longs), - ", ".join( - "{:d}) {}".format(num, ann_long) + u", ".join( + u"{:d}) {}".format(num, ann_long) for num, ann_long in enumerate(longs, start=1) ), ) -- cgit v1.2.1