Re: Checkins for 2.7 and 2.8 and missing unit tests

Andreas Jung <[email protected]>
Newsgroups gmane.comp.web.zope.coders
Message-ID <7F0D56DE4340CB20324DD418@[192.168.0.102]>

--On Freitag, 3. Dezember 2004 16:13 Uhr +0100 Florent Guillaume 
<[email protected]> wrote:

> Hi coders,
>
> I must say I'm disappointed with a number of checkins that happened in
> the past month for the 2.7 and trunk of Zope 2: many are missing unit
> tests.
>
> While I understand the need to "fix bugs", I can't see the point of doing
> this without adding unit tests that exercise the problem, and document
> the why and how of things. Just because a patch sits in the collector and
> "works" is no reason to apply it without writing a test, especially for
> subtle features such as quoting and escaping.
>
> Here's a sample of things for which I believe unit tests are important:
>
> http://mail.zope.org/pipermail/zope-checkins/2004-November/028556.html
>    no test of webdav escaping
> http://mail.zope.org/pipermail/zope-checkins/2004-November/028562.html
>    no test (escaping, cdata)
> http://mail.zope.org/pipermail/zope-checkins/2004-November/028654.html
>    no test (local roles)
> http://mail.zope.org/pipermail/zope-checkins/2004-December/028737.html
>    no test (clone in webdav)
> http://mail.zope.org/pipermail/zope-checkins/2004-December/028750.html
>    no test of ACTUAL_URL and URL quoting
>

I agree with you to some point. There are code areas in Zope 2 where we 
have absolutely
*no* tests e.g. webdav. Adding one or two tests to annon-existing test 
suite really
does not improve the code quality significantly. I think we have to live 
with this
situation in the Z2 land forever. Another point is that you have understand 
what the code
does to write tests (and in some cases to fix bugs). But a lot of the Z2 is 
badly documented
and hard to understand even with years of Zope experience. So changes like 
the
patches for ACTUAL_URL and URL quoting are fine for me without tests since 
the changes
can be tested very well through the web instead in an "artificial" 
environment as unittests
are at some point. As another example: we are currently working on the 
"readonly problem"
in WebDAV & M$ Word. DieterM has tracked this down to some misbehaviour in 
Zope and
to a much worser misbehaviour in terms of protocol violation in the M$ 
Webdav implementation.
There are things you can't test with unittests. Don't get me wrong. 
Unittests are perfectly
suitable for development if you use them from the beginning as in Zope 3. 
But in Zope 2
there were added very late in the development so the whole bugfixing in 
Zope 2 is like
maintaining a half-dead zombie.

Andreas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.