• Remember Mailing List

Re: test error

from "Michael A Rowley, MD" on Oct 23, 2006 03:03 PM
ahh, that is very useful information.  I will work on this and let  
you know what I get.  would make the test run much faster I imagine  
also.  Thanks much Rob for  your time.

Michael

On Oct 23, 2006, at 2:13 PM, Rob Miller wrote:

> Michael A Rowley, MD wrote:
>> Hello again.
>> Just looking for a little insite.  Have been trying to get my  
>> tests to run since moving to remember and membrane.  Has been  
>> rather an adventure.
>> again,  here is what I am running.
>> Python 2.4.3
>> Zope 2.9.5-final.
>> Plone 2.5.1
>> membrane svn checkout 21Oct2006
>> remember svn checkout 21Oct2006
>> here is the wierdness for today....
>> I am running the tests using the following command:
>> sudo /Applications/Plone-2.5.1/Instance/bin/zopectl test -vvvv -s  
>> Products.TORCH2
>> this only runs one test file in my tests directory, which does not  
>> inherit from the remember test class RememberTestBase,  then I get  
>> the error:
>
> i'm not 100% sure why you're seeing the problem you're seeing, but  
> i do have a suggestion for how you might get around it.
>
>> class torchTestCase(RememberTestBase):
>>     """ base class for Torch integration testing """
>>     def afterSetUp(self):
>>         RememberTestBase.afterSetUp(self)
>>         # now add our Product I guess.
>>         qi = self.portal.portal_quickinstaller
>>         #qi.installProducts(['AlphaFlow',], stoponerror=1)
>>         qi.installProducts(['TORCH2',], stoponerror=1)
>>         self.mdata = getToolByName(self.portal, 'portal_memberdata')
>>         self.addProvider()
>>         self.addPatient()
>
> the remember test setup has been refactored to use layers.  this is  
> more efficient that using afterSetUp, b/c you can have your custom  
> initialization stuff only run once for the entire test suite,  
> instead of rerunning it for every test.
>
> i'd recommend you create your own layer class, subclassing  
> Products.remember.tests.base.RememberProfileLayer.  create a setUp  
> class method (use the base class as a model), and do your setup in  
> there, committing the transaction when it's done.  then specify a  
> "layer=YourCustomLayerClass" in your torchTestCase.
>
> try that, let us know if it improves things for you.
>
> -r
>
> -- 
> To unsubscribe send an email with subject unsubscribe to  
> remember@....
> Please contact robm@... for questions.

Return to date view: threaded or flat