#27539: assertNumQueries fails if debug cursor wrapper fills
-----------------------------------+-------------------------------------
Reporter: Malcolm Box | Owner: reficul31
Type: Bug | Status: assigned
Component: Testing framework | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-----------------------------------+-------------------------------------
Comment (by Tim Graham):
The issue we're try to solve is if the entire test suite runs over 9K
queries, `assertNumQueries()` doesn't work. Your solution will only reset
the query count if `assertNumQueries()` is used. 9K queries might run
before that, that's why Aymeric suggested clearing the queries at the
start of each test.
We're not trying to solve or consider the case of a single test running
over 9K queries. If that happens to someone, they can open a new ticket.
--
Ticket URL: <https://code.djangoproject.com/ticket/27539#comment:13>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/062.ea73c460d91ce8758d06adfe8203fda6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.