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

Method test_mark_dynamically_in_funcarg

testing/test_mark.py:604–623  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

602 assert "TypeError" in str(values[0].longrepr)
603
604 def test_mark_dynamically_in_funcarg(self, pytester: Pytester) -> None:
605 pytester.makeconftest(
606 """
607 import pytest
608 @pytest.fixture
609 def arg(request):
610 request.applymarker(pytest.mark.hello)
611 def pytest_terminal_summary(terminalreporter):
612 values = terminalreporter.stats['passed']
613 terminalreporter._tw.line("keyword: %s" % values[0].keywords)
614 """
615 )
616 pytester.makepyfile(
617 """
618 def test_func(arg):
619 pass
620 """
621 )
622 result = pytester.runpytest()
623 result.stdout.fnmatch_lines(["keyword: *hello*"])
624
625 def test_no_marker_match_on_unmarked_names(self, pytester: Pytester) -> None:
626 p = pytester.makepyfile(

Callers

nothing calls this directly

Calls 4

fnmatch_linesMethod · 0.80
makeconftestMethod · 0.45
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected