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

Function test_empty_help_param

testing/test_helpconfig.py:62–78  ·  view source on GitHub ↗

Test that an empty help param is displayed correctly.

(pytester: Pytester)

Source from the content-addressed store, hash-verified

60
61
62def test_empty_help_param(pytester: Pytester) -> None:
63 """Test that an empty help param is displayed correctly."""
64 pytester.makeconftest(
65 """
66 def pytest_addoption(parser):
67 parser.addini("test_ini", "", default=True, type="bool")
68 """
69 )
70 result = pytester.runpytest("--help")
71 assert result.ret == 0
72 lines = [
73 " required_plugins (args):",
74 " plugins that must be present for pytest to run*",
75 " test_ini (bool):*",
76 "environment variables:",
77 ]
78 result.stdout.fnmatch_lines(lines, consecutive=True)
79
80
81def test_hookvalidation_unknown(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makeconftestMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected