[triangle-zpug] Summary of January 2005 Meeting

Chris Calloway cbc at unc.edu
Fri Jan 28 00:07:21 CET 2005


Tom Bryan wrote:
> Some updates for those who were there:

One other thing that Tom mentioned which is muy importante:

When fixing a Plone product, look to see if there is a test subdirectory 
in the product. If there is, run the test cases (with PloneTestCase) 
before fixing the product. Make a note of all the errors. Fix the 
product. Run the test cases again. If your fix has created any new 
errors, don't check in your fixes. Fix your fixes until all the test 
cases which were working before still work.

The notes for Tom's talk:

Tom's PyCon 2003 unit test presentation:
http://starship.python.net/crew/tbryan/UnitTestTalk/index.html

Stefan Holek's PloneTestCase presentation:
http://zope.org/Members/shh/Tutorial

The basics to get set up with running existing test cases in a product 
(I think; correct me if I'm wrong):

1) Put http://zope.org/Members/shh/ZopeTestCase in your 
$ZOPE_HOME/lib/python/Testing (not Products!).

2) Put http://zope.org/Members/shh/Tutorial/test.py in your 
$ZOPE_HOME/bin (overwriting the one that is there).

3) Linux: make test.py script executable. Make sure the first
line reads: #!/usr/bin/env /path/to/zope's/python2.3/bin/python

4) Export PloneTestCase from the Collective on sf.net ( 
http://cvs.sourceforge.net/viewcvs.py/collective/PloneTestCase/ ) and 
place in your $INSTANCE_HOME Products directory.

5) cd $INSTANCE_HOME

6a) Linux: $ZOPE_HOME/bin/test.py -v \
--config-file etc/zope.conf \
--libdir Products/PloneProductToTest

6b) Windows: python $ZOPE_HOME/bin/test.py -v \
--config-file etc/zope.conf \
--libdir Products/PloneProductToTest

-- 
Sincerely,

Chris Calloway
http://www.seacoos.org
office: 17-6 Venable Hall   phone: (919) 962-4323
mail: Campus Box #3300, UNC-CH, Chapel Hill, NC 27599




More information about the triangle-zpug mailing list