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

Method test_invoke_plugin_api

testing/acceptance_test.py:580–587  ·  view source on GitHub ↗
(self, capsys)

Source from the content-addressed store, hash-verified

578 out, err = capsys.readouterr()
579
580 def test_invoke_plugin_api(self, capsys) -> None:
581 class MyPlugin:
582 def pytest_addoption(self, parser):
583 parser.addoption("--myopt")
584
585 pytest.main(["-h"], plugins=[MyPlugin()])
586 out, err = capsys.readouterr()
587 assert "--myopt" in out
588
589 def test_pyargs_importerror(self, pytester: Pytester, monkeypatch) -> None:
590 monkeypatch.delenv("PYTHONDONTWRITEBYTECODE", False)

Callers

nothing calls this directly

Calls 2

MyPluginClass · 0.85
readouterrMethod · 0.45

Tested by

no test coverage detected