Skip to content

Commit 618af9e

Browse files
authored
Support utf8 display
1 parent f251cea commit 618af9e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

testing/test_pytest_html.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,3 +784,16 @@ def test_css_invalid_no_html(self, testdir):
784784
testdir.makepyfile("def test_pass(): pass")
785785
result = testdir.runpytest("--css", "style.css")
786786
assert result.ret == 0
787+
788+
def test_report_display_utf8(self, testdir):
789+
testdir.makepyfile(
790+
"""
791+
import pytest
792+
@pytest.mark.parametrize("caseName,input,expected", [('测试用例名称', '6*6', 36)])
793+
def test_eval(caseName, input, expected):
794+
assert eval(input) == expected
795+
"""
796+
)
797+
result, html = run(testdir)
798+
assert result.ret == 0
799+
assert r'\u6d4b\u8bd5\u7528\u4f8b\u540d\u79f0' not in html

0 commit comments

Comments
 (0)