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

Method test_mark_skip_doesnt_capture_output

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

Source from the content-addressed store, hash-verified

430
431 @parametrize_families
432 def test_mark_skip_doesnt_capture_output(
433 self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
434 ) -> None:
435 pytester.makepyfile(
436 """
437 import pytest
438 @pytest.mark.skip(reason="foo")
439 def test_skip():
440 print("bar!")
441 """
442 )
443 result, dom = run_and_parse(family=xunit_family)
444 assert result.ret == 0
445 node_xml = dom.find_first_by_tag("testsuite").toxml()
446 assert "bar!" not in node_xml
447
448 @parametrize_families
449 def test_classname_instance(

Callers

nothing calls this directly

Calls 4

run_and_parseFunction · 0.85
toxmlMethod · 0.80
find_first_by_tagMethod · 0.80
makepyfileMethod · 0.45

Tested by

no test coverage detected