Support utf8 display

This commit is contained in:
Andy.Yang 2019-11-05 13:44:08 +08:00 committed by GitHub
parent f251cea504
commit 618af9e072
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -784,3 +784,16 @@ class TestHTML:
testdir.makepyfile("def test_pass(): pass")
result = testdir.runpytest("--css", "style.css")
assert result.ret == 0
def test_report_display_utf8(self, testdir):
testdir.makepyfile(
"""
import pytest
@pytest.mark.parametrize("caseName,input,expected", [('测试用例名称', '6*6', 36)])
def test_eval(caseName, input, expected):
assert eval(input) == expected
"""
)
result, html = run(testdir)
assert result.ret == 0
assert r'\u6d4b\u8bd5\u7528\u4f8b\u540d\u79f0' not in html