Skip to content

Commit cee74aa

Browse files
[doc] Add terse changelog for streaming assertion comparisons
1 parent 6fbb8c3 commit cee74aa

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

changelog/14523.improvement.rst

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
A dict comparison with many keys only on one side ("Left/Right contains
2-
N more items") no longer pretty-prints the whole extra subdict when the
3-
explanation is going to be truncated anyway: past the truncation budget
4-
it emits only the smallest few keys, one per line. The item count is
5-
still reported in the header and the truncation footer is unchanged, so
6-
no information the user would have seen is lost. A failing
7-
``assert {i: i for i in range(2000)} == {}`` no longer spends time
8-
formatting ~2000 lines only to discard them.
1+
Large assertion comparison diffs are now built lazily and capped to the
2+
truncation budget, so a huge ``==`` mismatch is no longer formatted in
3+
full just to be truncated. As a result the truncation footer no longer
4+
reports the exact number of hidden lines.

0 commit comments

Comments
 (0)