MCPcopy Index your code
hub / github.com/python/mypy / test_serious_error

Method test_serious_error

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

Source from the content-addressed store, hash-verified

91 assert result == expected
92
93 def test_serious_error(self) -> None:
94 serious = True
95 messages_by_file: dict[str | None, list[str]] = {None: ["Error line 1", "Error line 2"]}
96 expected = """<?xml version="1.0" encoding="utf-8"?>
97<testsuite errors="1" failures="0" name="mypy" skips="0" tests="1" time="1.230">
98 <testcase classname="mypy" file="mypy" line="1" name="mypy-py3.14-test-plat" time="1.230">
99 <failure message="mypy produced messages">Error line 1
100Error line 2</failure>
101 </testcase>
102</testsuite>
103"""
104 result = _generate_junit_contents(
105 dt=1.23,
106 serious=serious,
107 messages_by_file=messages_by_file,
108 version="3.14",
109 platform="test-plat",
110 )
111 assert result == expected

Callers

nothing calls this directly

Calls 1

_generate_junit_contentsFunction · 0.90

Tested by

no test coverage detected