Skip to content

Commit b3fddc4

Browse files
Fix comment about minimal length of truncated message
1 parent 4d2c40f commit b3fddc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/_pytest/assertion/truncate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ def _truncate_explanation(
4949
# Check if truncation required
5050
input_char_count = len("".join(input_lines))
5151
# The length of the truncation explanation depends on the number of lines
52-
# removed but is at least 67 characters:
52+
# removed but is at least 68 characters:
5353
# The real value is
5454
# 64 (for the base message:
5555
# '...\n...Full output truncated (1 line hidden), use '-vv' to show")'
5656
# )
5757
# + 1 (for plural)
58-
# + int(math.log10(len(input_lines) - max_lines)) (number of hidden line)
58+
# + int(math.log10(len(input_lines) - max_lines)) (number of hidden line, at least 1)
5959
# + 3 for the '...' added to the truncated line
6060
# But if there's more than 100 lines it's very likely that we're going to
6161
# truncate, so we don't need the exact value using log10.

0 commit comments

Comments
 (0)