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

Method test_summing_simple

testing/test_junitxml.py:209–232  ·  view source on GitHub ↗
(
        self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
    )

Source from the content-addressed store, hash-verified

207class TestPython:
208 @parametrize_families
209 def test_summing_simple(
210 self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
211 ) -> None:
212 pytester.makepyfile(
213 """
214 import pytest
215 def test_pass():
216 pass
217 def test_fail():
218 assert 0
219 def test_skip():
220 pytest.skip("")
221 @pytest.mark.xfail
222 def test_xfail():
223 assert 0
224 @pytest.mark.xfail
225 def test_xpass():
226 assert 1
227 """
228 )
229 result, dom = run_and_parse(family=xunit_family)
230 assert result.ret
231 node = dom.get_first_by_tag("testsuite")
232 node.assert_attr(name="pytest", errors=0, failures=1, skipped=2, tests=5)
233
234 @parametrize_families
235 def test_summing_simple_with_errors(

Callers

nothing calls this directly

Calls 4

run_and_parseFunction · 0.85
get_first_by_tagMethod · 0.80
assert_attrMethod · 0.80
makepyfileMethod · 0.45

Tested by

no test coverage detected