Return the assert_queries() context manager directly in assertQueries().
Review Request #14389 — Created March 21, 2025 and submitted — Latest diff uploaded
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 callingassertQueries()
,
rather than showing intermediary stack traces.
Unit tests pass.
reviewboard/testing/testcase.py |
---|