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

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

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.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
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 Christian Hammond
reviewboard/testing/testcase.py
Loading...