[z3-five] Re: Restructuring
Philipp von Weitershausen
philipp at weitershausen.de
Mon Apr 25 09:49:52 CEST 2005
Hello all,
I just wanted to give you a small status report on my restructuring
work. If you want to check it out for yourself, checkout the branch at
http://codespeak.net/svn/z3/Five/branch/philikon-restructuring/.
Three subpackages were introduced:
- Five.browser: contains all browser-related code, such as browser
page configuration, our special Page Template implementation, etc.
Five.browser.tests also contains the extensive test suite for all
browser-related things.
- Five.form: contains mostly configuration code for the form machinery
and its tests (Five.form.tests).
- Five.skin: contains the (now only beginnings) of Five's skinning
support and tests of primarily the StandardMacros view.
As the subpackages were introduced, the tests were split up accordingly.
They are now grouped by feature and can be run much more atomically. The
FiveTest product is no longer, all the different functionality it
incorporated was split up into different modules and ZCML files that now
rest beside the test module. Finding your way around the tests should be
easy now, as you have for example:
- Five/tests/size.py
Five/tests/size.zcml
Five/tests/test_size.py
- Five/browser/tests/pages.py
Five/browser/tests/pages.zcml
Five/browser/tests/test_pages.py
and so on. Running tests is just as easy; you either run the test module
or you do:
bin/zopectl test --dir Products/Five
to run all tests. runalltests.py is no longer, as well as zopectl.py
(this was totally unnecessary anyway) and fivetest.py
What still needs to be done:
* First of all, I still have 9 failing tests. As we currently have 4
failing tests on the trunk, that makes up a total of 5 failures to fix.
This won't be hard though.
* Now that every test case launches its own set of ZCML statements, we
need to clean up after ourselves, otherwise other test cases might be
affected when you run them alltogether. This is an absolute requirement
for making tests more atomic and has been practiced in the Zope 3 core
since the beginning (in the form of PlacelessSetup).
* Last but not least, I will have to verify that everything runs on Zope
2.8.
* In the long term (not scope of this branch), I would like to introduce
a five ZCML directive that registers classes with Zope 2 using
context.registerClass(). This will not only be help people using Five to
reduce the amount of wiring in Python code, but also us developers to
run test classes like SimpleContent in a live Zope environment and
record functional tests etc.
I hope to finish this (except the last point) by the end of the week at
which time we might have already branched 1.0 off and be ready of the merge.
Philipp
More information about the z3-five
mailing list