Add subquery checks in assertQueries(), and improve output formatting.
Review Request #13372 — Created Oct. 23, 2023 and submitted — Latest diff uploaded
This updates
assertQueries()
to check for and compare subquery
information. This takes in aninner_query
attribute that matches the
query comparison dictionary and checks against it.This wasn't supported before, and because of that, this support must be
optional or we'll break existing tests. Currently, consumers can pass in
check_subqueries=True
to enable this. That will be the default in
Djblets 5. For now, if a subquery is found and no explicit
check_subqueries
value is provided, a deprecation warning will be
emitted.Formatting has also improved, in part to help output subquery comparison
details. All values are now passed throughpprint.pformat()
, and if
the results span multiple lines, it will be formatted with proper
indentation and alignment to help with reading the output.
All Djblets and Review Board unit tests pass.