On Jul 4, 2011, at 8:01 AM, Jacob Kaplan-Moss wrote:
> On Mon, Jul 4, 2011 at 8:54 AM, Jim Dalton wrote:
>> I've created a ticket for this and uploaded a patch:
>> https://code.djangoproject.com/ticket/16401
>> Please feel free to review and let me know if this is a good
On Mon, Jul 4, 2011 at 8:54 AM, Jim Dalton wrote:
> I've created a ticket for this and uploaded a patch:
> https://code.djangoproject.com/ticket/16401
> Please feel free to review and let me know if this is a good idea in the
> first place, as well as if the patch makes
I've created a ticket for this and uploaded a patch:
https://code.djangoproject.com/ticket/16401
Please feel free to review and let me know if this is a good idea in the first
place, as well as if the patch makes sense and is the right approach.
Thanks,
Jim
--
You received this message
>
> I believe as a general principle that a testing framework should always
> return the system under test to the state it was in prior to the run.
> Calling cache.flush() violates that principle -- and of principle concern to
> me, it flushes your *entire* cache. That means if someone executed
On Fri, Jul 1, 2011 at 12:27 PM, Jim Dalton wrote:
> Awesome feedback, thanks.
>
> On Jul 1, 2011, at 10:01 AM, Jeremy Dunck wrote:
>
...
>> If I were to do this, I wouldn't have cache shared between tests or
>> environments, so I'd be tempted to use flush.
>
> I'm not
Awesome feedback, thanks.
On Jul 1, 2011, at 10:01 AM, Jeremy Dunck wrote:
> Well, I think you forgot all the other low-level cache options, like
> .incr, .add, etc.?
Yep, forgot those so they would conceivably need to be tracked.
>
> If I were to do this, I wouldn't have cache shared between
On Fri, Jul 1, 2011 at 10:54 AM, Jim D. wrote:
> This issue came up again for me recently: Because the cache is not reset or
> flushed after every test, cache values linger there. This can create
> headaches when writing tests.
> I would like to propose that we treat the
This issue came up again for me recently: Because the cache is not reset or
flushed after every test, cache values linger there. This can create
headaches when writing tests.
I would like to propose that we treat the cache backend(s) like database
backends during the test run. Specifically, I