Fix showing output for non-sortable sets of values.

Review Request #14386 — Created March 21, 2025 and submitted

Information

django-assert-queries
main

Reviewers

When showing output from a failed comparison where sets are involved, we
try to sort the values to provide consistent odering for comparison.
When doing this, we could hit an error saying that the values aren't
sortable, due to __lt__ not being implemented.

We now detect this case and sort by the representations of the values
instead.

All unit tests pass.

Verified this fixed issues encountered in some new unit tests in
Review Board.

Summary ID
Fix showing output for non-sortable sets of values.
When showing output from a failed comparison where sets are involved, we try to sort the values to provide consistent odering for comparison. When doing this, we could hit an error saying that the values aren't sortable, due to `__lt__` not being implemented. We now detect this case and sort by the representations of the values instead.
b8c5cddf83ebbeee54797c732c33562fbfbf5431
Description From Last Updated

local variable 'obj1' is assigned to but never used Column: 9 Error code: F841

reviewbotreviewbot

local variable 'obj2' is assigned to but never used Column: 9 Error code: F841

reviewbotreviewbot
There are no open issues
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
maubin
  1. Ship It!
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Loading...