[Zope-CMF] Re: SVN: CMF/trunk/CMFCore/tests/test_ - made copy tests more independent from implementation details of _verifyObjectPaste

yuppie y.2005- at wcm-solutions.de
Fri Dec 2 13:58:57 EST 2005


Tres Seaver wrote:
>>  import Testing
>> -import Zope2
>> -Zope2.startup()
> 
> I'm seeing issues in some tests which fail when run outside the full
> suite after changes like these.  E.g.,
> 
> zopectl> test CMFDefault
> Running tests via:
> /home/tseaver/projects/Zope-CVS/Zope-2_8-branch/../bin/python
> /home/tseaver/projects/Zope-CVS/Zope-2_8-branch/test.py -v --config-file
> /home/tseaver/projects/CMF/cmf_test/viewify/etc/zope.conf --libdir
> Products CMFDefaultRunning unit tests at level 1
> Running unit tests from /home/tseaver/projects/CMF/cmf_test/viewify/Products
> Parsing /home/tseaver/projects/CMF/cmf_test/viewify/etc/zope.conf
> ............EE...........................................................
> ...............EEEEEEEE..................................................
> .EEEEEEE................EEEE..................
> ======================================================================
> ERROR: testDiscussionReply
> (CMFDefault.tests.test_DiscussionReply.DiscussionReplyTest)
> - ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File
> "/home/tseaver/projects/CMF/cmf_test/viewify/Products/CMFDefault/tests/test_DiscussionReply.py",
> line 45, in setUp
>     factory = self.root.manage_addProduct['CMFDefault'].addConfiguredSite
>   File
> "/home/tseaver/projects/Zope-CVS/Zope-2_8-branch/lib/python/App/FactoryDispatcher.py",
> line 26, in __getitem__
>     return self.__bobo_traverse__(None, name)
>   File
> "/home/tseaver/projects/Zope-CVS/Zope-2_8-branch/lib/python/App/FactoryDispatcher.py",
> line 29, in __bobo_traverse__
>     product=self.aq_acquire('_getProducts')()._product(name)
>   File
> "/home/tseaver/projects/Zope-CVS/Zope-2_8-branch/lib/python/App/Product.py",
> line 69, in _product
>     def _product(self, name): return getattr(self, name)
> AttributeError: CMFDefault
> 
> (and 20 more like it).
> 
> Do you have a clue about what the cause might be?

No idea. I thought it would be save to remove Zope2.startup() by default 
in Zope 2.8 and later. There are still some tests that need this, but 
apparently my way to test which ones is not sufficient.


I'm on Windows ATM, so I can't test it with zopectl. But

   bin\python.exe bin\test.py -v --libdir Products/CMFDefault

doesn't raise any errors on my machine.


Cheers,

	Yuppie



More information about the Zope-CMF mailing list