Skip to content

Commit 25a2e0d

Browse files
[doc] Add changelog for streaming assertion comparisons (pytest-dev#14523)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5118368 commit 25a2e0d

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

changelog/14523.improvement.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Assertion explanations are now built lazily and the truncator stops
2+
the comparison helpers as soon as it has enough output, so comparing
3+
two large collections no longer builds the full diff in order to
4+
discard it. A focused micro-benchmark the worst case scenario
5+
(``set(range(500_000)) == set(range(1, 500_001))``) drops from ~2,200 ms
6+
to ~43 ms; but realistic test suite with mostly small diffs should be
7+
unchanged.
8+
9+
The truncation footer no longer reports the hidden-line count
10+
(``...Full output truncated (N lines hidden), ...`` becomes
11+
``...Full output truncated, ...``); diff lines now carry a redundant
12+
``\x1b[0m`` reset prefix (invisible to terminals) so we can handle
13+
line one by one.

0 commit comments

Comments
 (0)