MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_unicode

Method test_unicode

testing/test_junitxml.py:765–780  ·  view source on GitHub ↗
(self, pytester: Pytester, run_and_parse: RunAndParse)

Source from the content-addressed store, hash-verified

763 assert "SyntaxError" in fnode.toxml()
764
765 def test_unicode(self, pytester: Pytester, run_and_parse: RunAndParse) -> None:
766 value = "hx\xc4\x85\xc4\x87\n"
767 pytester.makepyfile(
768 """\
769 # coding: latin1
770 def test_hello():
771 print(%r)
772 assert 0
773 """
774 % value
775 )
776 result, dom = run_and_parse()
777 assert result.ret == 1
778 tnode = dom.find_first_by_tag("testcase")
779 fnode = tnode.find_first_by_tag("failure")
780 assert "hx" in fnode.toxml()
781
782 def test_assertion_binchars(
783 self, pytester: Pytester, run_and_parse: RunAndParse

Callers

nothing calls this directly

Calls 4

run_and_parseFunction · 0.85
find_first_by_tagMethod · 0.80
toxmlMethod · 0.80
makepyfileMethod · 0.45

Tested by

no test coverage detected