MCPcopy
hub / github.com/pytest-dev/pytest / test_unicode

Method test_unicode

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

Source from the content-addressed store, hash-verified

830 assert "SyntaxError" in fnode.toxml()
831
832 def test_unicode(self, pytester: Pytester, run_and_parse: RunAndParse) -> None:
833 value = "hx\xc4\x85\xc4\x87\n"
834 pytester.makepyfile(
835 f"""\
836 # coding: latin1
837 def test_hello():
838 print({value!r})
839 assert 0
840 """
841 )
842 result, dom = run_and_parse()
843 assert result.ret == 1
844 tnode = dom.get_first_by_tag("testcase")
845 fnode = tnode.get_first_by_tag("failure")
846 assert "hx" in fnode.toxml()
847
848 def test_assertion_binchars(
849 self, pytester: Pytester, run_and_parse: RunAndParse

Callers

nothing calls this directly

Calls 4

run_and_parseFunction · 0.85
get_first_by_tagMethod · 0.80
toxmlMethod · 0.80
makepyfileMethod · 0.45

Tested by

no test coverage detected