MCPcopy Index your code
hub / github.com/pytest-dev/pytest / test_mark_skip_doesnt_capture_output

Method test_mark_skip_doesnt_capture_output

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

Source from the content-addressed store, hash-verified

499
500 @parametrize_families
501 def test_mark_skip_doesnt_capture_output(
502 self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
503 ) -> None:
504 pytester.makepyfile(
505 """
506 import pytest
507 @pytest.mark.skip(reason="foo")
508 def test_skip():
509 print("bar!")
510 """
511 )
512 result, dom = run_and_parse(family=xunit_family)
513 assert result.ret == 0
514 node_xml = dom.get_first_by_tag("testsuite").toxml()
515 assert "bar!" not in node_xml
516
517 @parametrize_families
518 def test_classname_instance(

Callers

nothing calls this directly

Calls 4

run_and_parseFunction · 0.85
toxmlMethod · 0.80
get_first_by_tagMethod · 0.80
makepyfileMethod · 0.45

Tested by

no test coverage detected