[Zope3-dev] The Zope Software Certification Program and Common
regebro at gmail.com
Tue Feb 21 12:36:17 EST 2006
On 2/21/06, Stephan Richter <srichter at cosmos.phy.tufts.edu> wrote:
> If nothing changed, then you need no tests. Of course things changed. The data
> structures changed. And the migration test is a wonderful opportunity to
> document those data structure changes.
*sigh* Could you please try to read what I wrote? There is no change.
It's two completely different products, one old, one new. The
datastructure did not "change" it war completely and fully replaced.
There are no similarities at all, and hence you can't document any
change. You can only document the old structure (done in the old
product) and the new structure (done in the new product).
> Of course, the tests are not useful for the end user, but they are useful for
> other programmers. Let's say tomorrow you decide to leave Nuxeo and another
> programmer has to work on your code. It will be much easier to read doctests
> than unit tests.
No it won't. See my answer to Benji.
> Doctests can be used to address both type of users. I usually find that
> functional tests are for end users and unit/integration doctests for
Its perfectly possible to write functional doctests, I assumed you
ment functional tests should be doctests too.
> You are not documenting how to write migration code, but you document how you
> do a particular migration and what data is being migrated.
Uhm. No, not via the tests no. The migration code, that actually does
the migration, and which therefore is the interesting part of this is
in a python script. It's reasonably documented, sure, but the tests do
not, and can not give any insight into this, as all the tests do is
call this method.
> > Well, I solve it by not using doctests, which I like better, because
> > it enables me to easily add and change the tests according to me
> > finding something new that needs testing, withouthaving to change a
> > binary file which can't be diffed. And how do you fit the ZODB into
> > the documentation? :-)
> Yeah, but the cost is that you keep an old setup around, which is not
Huh? Ah, you are still talking about upgrading from one version to
another. Well, yes, in that case the ZODB might be a good solution.
> > Tests are not always documentation. It's nice if they can be both, but
> > I don't think it's a good idea to require it to be both, because quite
> > often, it isn't.
> Tests *should* always be documentation.
No, you are wrong, and have now in several emails explained why, and
given an example. I have nothing further to add.
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
More information about the Zope3-dev