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

_______________________________________________
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to