Skip to content

Commit 0c442e4

Browse files
committed
Minor style improvements
1 parent b9309f1 commit 0c442e4

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

pytest_html/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def append_extra_html(self, extra, extra_index, test_index):
199199
elif extra.get('format') == extras.FORMAT_TEXT:
200200
content = extra.get('content')
201201
if isinstance(content, bytes):
202-
content = content.decode("utf-8")
202+
content = content.decode('utf-8')
203203
if self.self_contained:
204204
href = data_uri(content)
205205
else:

testing/test_pytest_html.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def pytest_runtest_makereport(item, call):
239239
@pytest.mark.parametrize('content, encoded', [
240240
("u'\u0081'", 'woE='),
241241
("'foo'", 'Zm9v'),
242-
("b'\\xe2\\x80\\x93'", "4oCT")])
242+
("b'\\xe2\\x80\\x93'", '4oCT')])
243243
def test_extra_text(self, testdir, content, encoded):
244244
testdir.makeconftest("""
245245
import pytest
@@ -326,8 +326,10 @@ def pytest_runtest_makereport(item, call):
326326
src = 'data:{0};base64,{1}'.format(mime_type, content)
327327
assert '<img src="{0}"/>'.format(src) in html
328328

329-
@pytest.mark.parametrize('content', [("u'\u0081'"), ("'foo'"),
330-
("b'\\xe2\\x80\\x93'")])
329+
@pytest.mark.parametrize('content', [
330+
("u'\u0081'"),
331+
("'foo'"),
332+
("b'\\xe2\\x80\\x93'")])
331333
def test_extra_text_separated(self, testdir, content):
332334
testdir.makeconftest("""
333335
import pytest

0 commit comments

Comments
 (0)