[Zope-CMF] Re: GenericSetup: catalog.xml ideas

yuppie y.2007- at wcm-solutions.de
Mon Apr 9 12:10:45 EDT 2007


Hi!


Maurits van Rees wrote:
> yuppie, on 2007-03-02:
>> Maurits van Rees wrote:
>>> So here are some points, with suggested changes to the _initIndexes
>>> function in exportimport.py.  The tests even run after this, so it
>>> seems these changes do not break anything.  But I have not *added*
>>> tests for this.
>> To get your patches accepted it would be useful to have new tests that
>> fail without the patches.
> 
> Okay, I have a patch with such a test for the first point that I
> raised: removing an index in an extension profile and then making sure
> that reapplying that profile does not throw an error.
> 
> [...]
> 
> Can this go in?  I have no commit rights, so someone else would have
> to do that.

Looks fine, I checked it in:
http://svn.zope.org/?rev=74050&view=rev
http://svn.zope.org/?rev=74051&view=rev

> BTW, I am slightly freaked out by the following.  In that test file
> there is this test:
> 
>         self.assertEqual(adapted.body, _CATALOG_BODY % ('', _ZCTEXT_XML))
> 
> The test passes of course.  But when I copy that line so the test is
> run twice, like this:
> 
>         self.assertEqual(adapted.body, _CATALOG_BODY % ('', _ZCTEXT_XML))
>         self.assertEqual(adapted.body, _CATALOG_BODY % ('', _ZCTEXT_XML))
> 
> then the second test throws an error!
> 
> [...]
> 
> Going in with the pdb also throws that error when you try to print
> adapted.body twice.
> 
> I will loan you my "Here be dragons" sign. ;-)

Fixed as well.


Cheers,

	Yuppie



More information about the Zope-CMF mailing list