• 
      

    Improve output when failing an assertWarnings().

    Review Request #14699 — Created Nov. 18, 2025 and submitted

    Information

    Djblets
    release-5.x

    Reviewers

    Previously, when assertWarnings() found fewer or more warnings than
    expected, the only result we'd get was an assertion error showing the
    mismatched lengths.

    Now, any mismatches between expected and actual warnings will result in
    a full list of the mismatches, helping with diagnosing which warnings
    were missing or added.

    Unit tests pass.

    Tested this with an assertion error I hit. Verified I got a more useful
    warnings display.

    Summary ID
    Improve output when failing an assertWarnings().
    Previously, when `assertWarnings()` found fewer or more warnings than expected, the only result we'd get was an assertion error showing the mismatched lengths. Now, any mismatches between expected and actual warnings will result in a full list of the mismatches, helping with diagnosing which warnings were missing or added.
    933fa19b5a8193d9d7d6fb3f7ae219700e3f06cf
    Description From Last Updated

    'django.template.base.Parser' imported but unused Column: 1 Error code: F401

    reviewbotreviewbot

    'collections.abc.Iterable' imported but unused Column: 5 Error code: F401

    reviewbotreviewbot
    Checks run (1 failed, 1 succeeded)
    flake8 failed.
    JSHint passed.

    flake8

    chipx86
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-5.x (0de4506)