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

Method test_skip_contains_name_reason

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

Source from the content-addressed store, hash-verified

432
433 @parametrize_families
434 def test_skip_contains_name_reason(
435 self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
436 ) -> None:
437 pytester.makepyfile(
438 """
439 import pytest
440 def test_skip():
441 pytest.skip("hello23")
442 """
443 )
444 result, dom = run_and_parse(family=xunit_family)
445 assert result.ret == 0
446 node = dom.get_first_by_tag("testsuite")
447 node.assert_attr(skipped=1)
448 tnode = node.get_first_by_tag("testcase")
449 tnode.assert_attr(classname="test_skip_contains_name_reason", name="test_skip")
450 snode = tnode.get_first_by_tag("skipped")
451 snode.assert_attr(type="pytest.skip", message="hello23")
452
453 @parametrize_families
454 def test_mark_skip_contains_name_reason(

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