[Zope3-dev] testing and savepoints

Chris Withers chris at simplistix.co.uk
Tue Oct 17 14:41:34 EDT 2006


Jim Fulton wrote:
>> Each layer drops a savepoint in setUp and then rolls it back it in 
>> tearDown. Likewise, the TestCase's setUp would drop a savepoint and 
>> the tearDown would roll back to it.
> 
> This is a risky approach.  If you have any software that does actual 
> commits,
> you'll be hosed.

Not sure what you mean by that... The reason I want to use savepoints is 
for ease of tearDown...

> I suggest using demo storages instead. Demo storages will
> also be faster.

...I'm already using DemoStorage.

> Well, they are going to make any approach like this difficult. That's why
> I avoid them.

Still leaves me wondering why they were implemented :-S
They seem ideal for this kind of thing...

>> 3. savepoints are really slow :-(
> 
> ditto.

I'm guessing the savepoint speed is going to be dictated by the 
underlying storage? Which storage is your comment based on?

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope3-dev mailing list