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

Method test_assertion_binchars

testing/test_junitxml.py:848–863  ·  view source on GitHub ↗

This test did fail when the escaping wasn't strict.

(
        self, pytester: Pytester, run_and_parse: RunAndParse
    )

Source from the content-addressed store, hash-verified

846 assert "hx" in fnode.toxml()
847
848 def test_assertion_binchars(
849 self, pytester: Pytester, run_and_parse: RunAndParse
850 ) -> None:
851 """This test did fail when the escaping wasn't strict."""
852 pytester.makepyfile(
853 """
854
855 M1 = '\x01\x02\x03\x04'
856 M2 = '\x01\x02\x03\x05'
857
858 def test_str_compare():
859 assert M1 == M2
860 """
861 )
862 _result, dom = run_and_parse()
863 print(dom.toxml())
864
865 @pytest.mark.parametrize("junit_logging", ["no", "system-out"])
866 def test_pass_captures_stdout(

Callers

nothing calls this directly

Calls 3

run_and_parseFunction · 0.85
toxmlMethod · 0.80
makepyfileMethod · 0.45

Tested by

no test coverage detected