[ZODB-Dev] Repozo tests -- not

Martin Aspeli optilude+lists at gmail.com
Tue Dec 1 20:44:26 EST 2009


Jim Fulton wrote:
> On Fri, Nov 20, 2009 at 1:52 PM, Jim Fulton <jim at zope.com> wrote:
>> On Fri, Nov 20, 2009 at 1:36 PM, Tres Seaver <tseaver at palladion.com> wrote:
> ...
>>>>> I just checked in a stupid test to ensure that repozo can be imported.
>>>>>
>>>>> - --- src/ZODB/scripts/tests.py (revision 105913)
>>>>> +++ src/ZODB/scripts/tests.py   (working copy)
>>>>> @@ -26,6 +26,11 @@
>>>>>     (re.compile('hash=[0-9a-f]{40}'),
>>>>>      'hash=b16422d09fabdb45d4e4325e4b42d7d6f021d3c3')])
>>>>>
>>>>> +class RepozoTests(unittest.TestCase):
>>>>> +
>>>>> +    def test_importability(self):
>>>>> +        from ZODB.scripts import repozo
>>>>> +
> 
> ...
> 
>>>> That test passes under ZODB 3.9.3 with Python 2.6.
>>> It emits the same DeprecationWarning (the "bug" Withers fixed).  I did
>>> have to munge the 'test_suite' dinosaur as well.
>> Fair enough. Given that this provokes the symptom that was fixed.
>> I can live with this.
> 
> Well, not really fair enough.  I just looked at the change that Chris
> made.  It has a bug
> that would be caught by your test if anyone tried to port repozo to
> Python 3.  More
> importantly, Chris' change touches non-trivial code that isn't
> exercised by your test.
> It *looks* OK  (aside from the minor bug).  We are doing users a
> serious disservice
> giving  them such an important tool with minimal tests and no automated tests.
> 
> I'm going to back out these changes.  If someone really cares about
> repozo in the
> slightest, they'll at least convert the existing manual test into an
> automated test.
> I'm pretty sure that this is a straightforward project. With an
> automated version of the
> manual test,  I'd be comfortable reapplying Chris' change.
> 
> Is anyone willing to convert the manual test to an automated one?

Can you clarify this? To me, it looks like:

  - there was a small/trivial bug
  - there were no tests for the existing code
  - Chris fixed it, and didn't add any tests
  - Noise ensued
  - Tres wrote a trivial test for the trivial fix
  - You now found some different problem in the same code, and want to 
back out Chris' change because he didn't go and add a bunch of tests for 
the rest of the code, which he didn't change.

If I have this right, I am astonished. I'm going to give you a chance to 
tell me I have it all wrong before I pass judgement, though.

Martin

-- 
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book



More information about the ZODB-Dev mailing list