On Sunday 22 September 2013 22:55:15 Aymeric Augustin wrote:
> Hi Michael,
> 
> On 22 sept. 2013, at 22:48, Michael Manfre <[email protected]> wrote:
> > On Sun, Sep 22, 2013 at 3:18 PM, Aymeric Augustin
> > <[email protected]> wrote:
> > 
> > The extra queries for the savepoints will break all tests that use
> > assertNumQueries — well, all except assertNumQueries(0). How do you
> > propose to deal with that.
> > 
> > When changes are made to Django in such a way that existing tests no
> > longer accurately test the expected behavior, I propose that the tests
> > are fixed.
> > 
> > I'd argue that many of the tests that use assertNumQueries are poorly
> > written and should be viewed as already broken. This opinion is based
> > upon my efforts of making django-mssql pass the test suite.
>
> Yes, I agree with that as far as Django's own test suite is concerned.
> 
> I was more worried about our end users' test suites.
>

If this is agreed, then we should add an assertNoQueries, deprecate the 
existing assertNumQueries, and add a new assertNumQueries that takes a backend 
specification, shouldn't we? This is regardless of what we do with @atomic.
 
> Currently, if you don't use transactions, you can ignore the new transaction
> management entirely. If all your assertNumQueries start failing, it's
> another story.

The code base I mentioned earlier relies mostly on TransactionMiddleware, but 
does have some explicit commit_on_success's etc. (it's Django 1.4 based, so no 
@atomic or anything like it).

Shai.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" 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].
Visit this group at http://groups.google.com/group/django-developers.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to