[Zope-dev] How to test changes to ZTK packages?

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Jun 30 13:03:35 EDT 2009


On Tuesday 30 June 2009, Jim Fulton wrote:
> I should know this, but I don't.  What is the recommended way to test  
> changes to core ZTK packages to mitigate the risk that changes affect  
> other packages? Is there a page somewhere with instructions?
>
> I tried using using zope.release.  Building the trunk of zope.release  
> with Python 2.4 and running the tests gives lots of test import errors  
> and test failures.  (Lots of tests want to import z3c.pt.) The tests  
> hang when I try to build and run with Python 2.6.

Yes, I think testing with zope.release is a good way of doing this right now. 
I tried to verify the steps:

1. Checkout zope.release
2. Run python bootstrap.py
3. Run ./bin/buildout -N
4. Run ./bin/generate-buildout

5. cd test
6. python ../bootstrap.py
7. ./bin/buildout -N
8. ./bin/test -vpc1

I am running the tests as I am writing this. So far I got one failure:

Traceback (most recent call last):
  File "/opt/zope/packages/eggs/z3c.macro-1.2.1-py2.5.egg/z3c/macro/tests.py", 
line 29, in <module>
    import z3c.pt
ImportError: No module named pt

I'll report the full output when it is done.

> BTW, zope.release wants lxml, which is a real pain on Mac OS X and  
> Centos 4.  Does the ZTK really need to depend on lxml?

It is needed for the "latest-versions" script as this parses XML. I consider 
lxml pretty much the standard tool to do XML in Python these days. Who is not 
using lxml?

Having said that, "latest-versions" is not needed by everyone all the time. I 
could live with putting it into an extra and not build the latest-versions 
script by default.

Regards,
Stephan
-- 
Entrepreneur and Software Geek
Google me. "Zope Stephan Richter"



More information about the Zope-Dev mailing list