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

Method _get_max_warnings

src/_pytest/terminal.py:1072–1080  ·  view source on GitHub ↗

Return the max_warnings threshold, from CLI or INI, or None if unset.

(self)

Source from the content-addressed store, hash-verified

1070 return ""
1071
1072 def _get_max_warnings(self) -> int | None:
1073 """Return the max_warnings threshold, from CLI or INI, or None if unset."""
1074 value = self.config.option.max_warnings
1075 if value is not None:
1076 return int(value)
1077 ini_value = self.config.getini("max_warnings")
1078 if ini_value:
1079 return int(ini_value)
1080 return None
1081
1082 #
1083 # Summaries for sessionfinish.

Callers 1

pytest_sessionfinishMethod · 0.95

Calls 2

intClass · 0.85
getiniMethod · 0.45

Tested by

no test coverage detected