MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_summing_simple

Method test_summing_simple

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

Source from the content-addressed store, hash-verified

142class TestPython:
143 @parametrize_families
144 def test_summing_simple(
145 self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
146 ) -> None:
147 pytester.makepyfile(
148 """
149 import pytest
150 def test_pass():
151 pass
152 def test_fail():
153 assert 0
154 def test_skip():
155 pytest.skip("")
156 @pytest.mark.xfail
157 def test_xfail():
158 assert 0
159 @pytest.mark.xfail
160 def test_xpass():
161 assert 1
162 """
163 )
164 result, dom = run_and_parse(family=xunit_family)
165 assert result.ret
166 node = dom.find_first_by_tag("testsuite")
167 node.assert_attr(name="pytest", errors=0, failures=1, skipped=2, tests=5)
168
169 @parametrize_families
170 def test_summing_simple_with_errors(

Callers

nothing calls this directly

Calls 4

run_and_parseFunction · 0.85
find_first_by_tagMethod · 0.80
assert_attrMethod · 0.80
makepyfileMethod · 0.45

Tested by

no test coverage detected