• 
      

    Return the assert_queries() context manager directly in assertQueries().

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

    Information

    Review Board
    release-7.1.x

    Reviewers

    Our assertQueries() wrapper now returns the context manager from
    assert_queries() directly, rather than wrapping in another layer of
    context managers. This allows django-assert-queries 2.0.1 and higher to
    show results directly under the line of code calling assertQueries(),
    rather than showing intermediary stack traces.

    Unit tests pass.

    Summary ID
    Return the assert_queries() context manager directly in assertQueries().
    Our `assertQueries()` wrapper now returns the context manager from `assert_queries()` directly, rather than wrapping in another layer of context managers. This allows django-assert-queries 2.0.1 and higher to show results directly under the line of code calling `assertQueries()`, rather than showing intermediary stack traces.
    12b64e3cdc366888b78e3ad265a09728af1a95ca
    maubin
    1. Ship It!
    2. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-7.1.x (d5abafb)