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

Function test_hookvalidation_optional

testing/test_helpconfig.py:93–103  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

91
92
93def test_hookvalidation_optional(pytester: Pytester) -> None:
94 pytester.makeconftest(
95 """
96 import pytest
97 @pytest.hookimpl(optionalhook=True)
98 def pytest_hello(xyz):
99 pass
100 """
101 )
102 result = pytester.runpytest()
103 assert result.ret == ExitCode.NO_TESTS_COLLECTED
104
105
106def test_traceconfig(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 2

makeconftestMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected