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

Function pytest_addoption

src/_pytest/terminal.py:137–288  ·  view source on GitHub ↗
(parser: Parser)

Source from the content-addressed store, hash-verified

135
136
137def pytest_addoption(parser: Parser) -> None:
138 group = parser.getgroup("terminal reporting", "Reporting", after="general")
139 group._addoption( # private to use reserved lower-case short option
140 "-v",
141 "--verbose",
142 action="count",
143 default=0,
144 dest="verbose",
145 help="Increase verbosity",
146 )
147 group.addoption(
148 "--no-header",
149 action="store_true",
150 default=False,
151 dest="no_header",
152 help="Disable header",
153 )
154 group.addoption(
155 "--no-summary",
156 action="store_true",
157 default=False,
158 dest="no_summary",
159 help="Disable summary",
160 )
161 group.addoption(
162 "--no-fold-skipped",
163 action="store_false",
164 dest="fold_skipped",
165 default=True,
166 help="Do not fold skipped tests in short summary.",
167 )
168 group.addoption(
169 "--force-short-summary",
170 action="store_true",
171 dest="force_short_summary",
172 default=False,
173 help="Force condensed summary output regardless of verbosity level.",
174 )
175 group._addoption( # private to use reserved lower-case short option
176 "-q",
177 "--quiet",
178 action=MoreQuietAction,
179 default=0,
180 dest="verbose",
181 help="Decrease verbosity",
182 )
183 group.addoption(
184 "--verbosity",
185 dest="verbose",
186 type=int,
187 default=0,
188 help="Set verbosity. Default: 0.",
189 )
190 group._addoption( # private to use reserved lower-case short option
191 "-r",
192 "--report-chars",
193 action="store",
194 dest="reportchars",

Callers

nothing calls this directly

Calls 5

getgroupMethod · 0.80
_addoptionMethod · 0.80
addiniMethod · 0.80
_add_verbosity_iniMethod · 0.80
addoptionMethod · 0.45

Tested by

no test coverage detected