[Zope-CMF] unit test weirdness.

Mark McEahern marklists@mceahern.com
Wed, 19 Feb 2003 16:47:41 -0600


Hmm, I think one problem might be that CMFCore/tests/base/testcase.py does
this:

  import Zope

as if it's expecting this to open the database.  My version of
lib/python/Zope/__init__.py (2.6.1) indicates this no longer works unless
you set the environment variable ZOPE_COMPATIBLE_STARTUP.  Instead, it
recommends you do:

  Zope.startup()

after:

  import Zope

In other words:

  import Zope
  Zope.startup()

So I'm guessing the reason CMFCore's tests work when called in a batch is
that something else opens the database first.  SCMFCore.tests.base.testcase
effectively assumes something that's not always true?

// m

-