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

Method _determine_show_progress_info

src/_pytest/terminal.py:410–433  ·  view source on GitHub ↗

Return whether we should display progress information based on the current config.

(
        self,
    )

Source from the content-addressed store, hash-verified

408 self._keyboardinterrupt_memo: ExceptionRepr | None = None
409
410 def _determine_show_progress_info(
411 self,
412 ) -> Literal["progress", "count", "times", False]:
413 """Return whether we should display progress information based on the current config."""
414 # do not show progress if we are not capturing output (#3038) unless explicitly
415 # overridden by progress-even-when-capture-no
416 if (
417 self.config.getoption("capture", "no") == "no"
418 and self.config.getini("console_output_style")
419 != "progress-even-when-capture-no"
420 ):
421 return False
422 # do not show progress if we are showing fixture setup/teardown
423 if self.config.getoption("setupshow", False):
424 return False
425 cfg: str = self.config.getini("console_output_style")
426 if cfg in {"progress", "progress-even-when-capture-no"}:
427 return "progress"
428 elif cfg == "count":
429 return "count"
430 elif cfg == "times":
431 return "times"
432 else:
433 return False
434
435 @property
436 def verbosity(self) -> int:

Callers 1

__init__Method · 0.95

Calls 2

getoptionMethod · 0.80
getiniMethod · 0.45

Tested by

no test coverage detected