diff --git a/changelog/14675.improvement.rst b/changelog/14675.improvement.rst new file mode 100644 index 00000000000..6a9d4808cc0 --- /dev/null +++ b/changelog/14675.improvement.rst @@ -0,0 +1 @@ +Allowed integer values for :confval:`truncation_limit_lines` and :confval:`truncation_limit_chars` in configurations. diff --git a/src/_pytest/assertion/__init__.py b/src/_pytest/assertion/__init__.py index e33f8b29609..e8d1e3f77dd 100644 --- a/src/_pytest/assertion/__init__.py +++ b/src/_pytest/assertion/__init__.py @@ -49,11 +49,13 @@ def pytest_addoption(parser: Parser) -> None: parser.addini( "truncation_limit_lines", + type="int", default=None, help="Set threshold of LINES after which truncation will take effect", ) parser.addini( "truncation_limit_chars", + type="int", default=None, help=("Set threshold of CHARS after which truncation will take effect"), )