On Thu, 08 Sep 2005 12:08:23 +0200, yuppie wrote:

> - Please make sure your checkins show up on the CMF-checkins list. Don't 
> know if Tres can fix that for you or if you've got to register for that 
> list.

Ok, I will look into it.

> - Please don't forget to set svn:eol-style and svn:keywords Id for new 
> files.

D'oh -- I forgot those.
> - Tests are easier to find and maintain if they are located in 
> test_<module_name>.py. Most CMF tests follow that pattern.

Yes, I put the tests relating to new CachingPolicyManager functionality
into test_CachingPolicyManager.py.  The other tests I added were
integration tests that check how CachingPolicyManager interacts with
FSPageTemplate.py.  I didn't really think those tests were appropriate for
either test_CachingPolicyManager.py or test_FSPageTemplate.py.  Instead I
put them in test_Template304Handling.py, and I tried to convey the
functionality being tested in the file name.  I'm open to other naming
suggestions, though.

>> PS  Those of you who raised concerns about ZopeTestCase causing test
>> problems in Zope 2.7 might want to take a look at why test_z3interfaces is
>> broken when you run the tests with zopectl test.
> 1.) Why "those of you who raised concerns about ZopeTestCase"?
> 2.) Please note that I raised concerns about using PortalTestCase.
> 3.) Please be more specific. I can't reproduce any problems with 
> test_z3interfaces.

Yeah, sorry to sound cranky here -- I'm in the middle of a nasty
deployment.  I put in some effort getting my tests to degrade quietly for
Zope 2.7 only to find some other Zope 2.7 problems with the tests.  It
could be it's my setup, though -- I'm not sure.  When running the tests
with a fresh checkout of the 1.5 branch on Zope 2.7.7 using

bin/zopectl test --dir Products/CMFCore/tests

I get a bunch of errors like the following:

ERROR: test_z3interfaces (CMFCore.tests.test_ActionInformation.ActionInfoTests)
Traceback (most recent call last):
  File "/home/zope/plonedev/Products/CMFCore/tests/test_ActionInformation.py", 
line 60, in test_z3interfaces
    from Products.CMFCore.interfaces import IActionInfo
ImportError: cannot import name IActionInfo

I don't see IActionInfo defined anywhere in interfaces, so I don't think
it's just me.

One other frustration: I was able to run my new tests in isolation, but
when I ran the whole test suite, they failed.  The problem appears to be
that somehow some things that happen in test_ActionProviderBase.py are not
being cleaned up before test_Template304Handling.py.  Some items placed in
the CMFSetup profile registry in test_ActionProviderBase.py are still
present when test_Template304Handling.py runs.  I added a workaround that
clears out profile_registry, but that shouldn't be necessary.  I don't
know if the problem is with the test runner or with
test_ActionProviderBase.py, but it's definitely bad that state from one
test is affecting another.  This problem appeared in both Zope 2.7.7 and
Zope 2.8.1.


Zope-CMF maillist  -  Zope-CMF@lists.zope.org

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

Reply via email to