On Mon, Oct 11, 2010 at 2:05 PM, Jacob Kaplan-Moss wrote:
> On Mon, Oct 11, 2010 at 12:29 PM, Alex Gaynor wrote:
>> I've uploaded a new patch [...]
>
> Looks pretty good to me.
>
> I must say, though, that I'm not completely happy with the API. I find
> ``assertNumQueries(number, callable)`` a bi
On Mon, Oct 11, 2010 at 12:29 PM, Alex Gaynor wrote:
> I've uploaded a new patch [...]
Looks pretty good to me.
I must say, though, that I'm not completely happy with the API. I find
``assertNumQueries(number, callable)`` a bit non-obvious. The context
manager helps quite a bit, but I'd really p
On Mon, Oct 11, 2010 at 4:47 AM, Russell Keith-Magee
wrote:
> On Mon, Oct 11, 2010 at 4:35 PM, Andrew Godwin wrote:
>> On 11/10/10 07:05, Alex Gaynor wrote:
>>>
>>> I think the solution there is something like:
>>>
>>> @skipUnless(sys.version>= (2, 5))
>>> def test(self):
>>> exec """
>>>
On Mon, Oct 11, 2010 at 4:35 PM, Andrew Godwin wrote:
> On 11/10/10 07:05, Alex Gaynor wrote:
>>
>> I think the solution there is something like:
>>
>> @skipUnless(sys.version>= (2, 5))
>> def test(self):
>> exec """
>> from __future__ import with_statement
>> with self.assertNum
On 11/10/10 07:05, Alex Gaynor wrote:
I think the solution there is something like:
@skipUnless(sys.version>= (2, 5))
def test(self):
exec """
from __future__ import with_statement
with self.assertNumQueries(1):
Model.objects.get(pk=2)
"""
Not exactly beau
On Mon, Oct 11, 2010 at 6:17 AM, Alex Gaynor wrote:
> Hey all,
>
> I've been spending some time with ticket #5416[0], which is a request
> for assertNumQueries in tests. The primary objection Russ had to the
> previous patch in this vein was that It uses connection.queries as
> opposed to the pro
On Mon, Oct 11, 2010 at 2:02 AM, Russell Keith-Magee
wrote:
> 2010/10/11 Mikhail Korobov :
>> Hi all,
>>
>> If it will be a contextmanager then it can also be extended to perform
>> like a decorator: http://gist.github.com/573536
>> I think this can be useful.
>
> Alex and I have spoken about this
2010/10/11 Mikhail Korobov :
> Hi all,
>
> If it will be a contextmanager then it can also be extended to perform
> like a decorator: http://gist.github.com/573536
> I think this can be useful.
Alex and I have spoken about this (and a couple of other places that
context managers would be useful, l
Hi all,
If it will be a contextmanager then it can also be extended to perform
like a decorator: http://gist.github.com/573536
I think this can be useful.
On 11 окт, 04:17, Alex Gaynor wrote:
> Hey all,
>
> I've been spending some time with ticket #5416[0], which is a request
> for assertNumQuer
Hey all,
I've been spending some time with ticket #5416[0], which is a request
for assertNumQueries in tests. The primary objection Russ had to the
previous patch in this vein was that It uses connection.queries as
opposed to the proposed signal. However, Russ and I spoke last night
and neither
10 matches
Mail list logo