We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f27a339 commit 48087fdCopy full SHA for 48087fd
1 file changed
src/_pytest/assertion/truncate.py
@@ -107,12 +107,8 @@ def _truncate_explanation(
107
# No truncation happened, so we do not need to add any explanations
108
return truncated_explanation
109
110
- if truncated_explanation[-1]:
111
- # Add ellipsis and take into account part-truncated final line
112
- truncated_explanation[-1] = truncated_explanation[-1] + "..."
113
- else:
114
- # Add proper ellipsis when we were able to fit a full line exactly
115
- truncated_explanation[-1] = "..."
+ # Something was truncated, adding '...' at the end to show that
+ truncated_explanation[-1] += "..."
116
truncated_line_count = (
117
len(input_lines) - len(truncated_explanation) + int(truncated_char)
118
)
0 commit comments