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

Function test_terminalreporter_reportopt_addopts

testing/test_terminal.py:1462–1478  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

1460
1461
1462def test_terminalreporter_reportopt_addopts(pytester: Pytester) -> None:
1463 pytester.makeini("[pytest]\naddopts=-rs")
1464 pytester.makepyfile(
1465 """
1466 import pytest
1467
1468 @pytest.fixture
1469 def tr(request):
1470 tr = request.config.pluginmanager.getplugin("terminalreporter")
1471 return tr
1472 def test_opt(tr):
1473 assert tr.hasopt('skipped')
1474 assert not tr.hasopt('qwe')
1475 """
1476 )
1477 result = pytester.runpytest()
1478 result.stdout.fnmatch_lines(["*1 passed*"])
1479
1480
1481def test_tbstyle_short(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 4

fnmatch_linesMethod · 0.80
makeiniMethod · 0.45
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected