MCPcopy Create free account
hub / github.com/python/mypy / test_junit_pass

Method test_junit_pass

mypy/test/testutil.py:26–42  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

24
25class TestWriteJunitXml(TestCase):
26 def test_junit_pass(self) -> None:
27 serious = False
28 messages_by_file: dict[str | None, list[str]] = {}
29 expected = """<?xml version="1.0" encoding="utf-8"?>
30<testsuite errors="0" failures="0" name="mypy" skips="0" tests="1" time="1.230">
31 <testcase classname="mypy" file="mypy" line="1" name="mypy-py3.14-test-plat" time="1.230">
32 </testcase>
33</testsuite>
34"""
35 result = _generate_junit_contents(
36 dt=1.23,
37 serious=serious,
38 messages_by_file=messages_by_file,
39 version="3.14",
40 platform="test-plat",
41 )
42 assert result == expected
43
44 def test_junit_fail_escape_xml_chars(self) -> None:
45 serious = False

Callers

nothing calls this directly

Calls 1

_generate_junit_contentsFunction · 0.90

Tested by

no test coverage detected