[Zope3-dev] two small bugs in zc.relationship

Markus Kemmerling markus.kemmerling at meduniwien.ac.at
Wed Jul 4 10:59:23 EDT 2007


You are right, I should have provided tests for the changes right away.

As pointed out by Stefan, I modified the `findRelationships` and  
`isLinked` methods in the `shared` module to no longer use logical  
operations to check if a `target` object was provided.  As far as I  
can see, that makes any additional tests superfluous.

What I did add at the end of container.txt are some tests for the  
convenience classes for one-to-one, many-to-one and one-to-many  
relationships.

On writing the tests I discoverd another typo for the  
`ITargetRelationship` interface.  I also changed the base interfaces  
for `ISourceRelationship` and `ITargetRelationship` from  
`IRelationship` to `IMutableRelationship`, because that's what they are.

Please find the patches appended.

Thanks a lot for your effort, `zc.relationship` is a great package.  
Replacing our own implementation of relationships by it made our code  
simpler and probably more stable.

Markus Kemmerling

-------------- next part --------------
A non-text attachment was scrubbed...
Name: relationship-patch.tgz
Type: application/octet-stream
Size: 2726 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20070704/7055f37c/relationship-patch.obj
-------------- next part --------------

Am 02.07.2007 um 21:25 schrieb Gary Poster:

>
> On Jul 2, 2007, at 6:19 PM, Gary Poster wrote:
>
>>
>> On Jul 2, 2007, at 3:24 PM, Markus Kemmerling wrote:
>>
>>> Hi,
>>>
>>> I discovered two smalll bugs in `zc.relationship`.
>>
>> Thanks, I'll get those in 24 hours or so.
>>
>> FWIW, generally, tests would be appreciated too, particularly of  
>> the index.  I'll make one for the index: I use that heavily and  
>> the tests are pretty thorough (never thorough enough, of course).   
>> The container stuff is sadly not very well tested, and I don't  
>> have the motivation for adding to it.
>
> I just looked at the bugs and they are both in the container  
> wrappers, as opposed to the core index.  Could you whip up a diff  
> for container.txt to test this?  I'll then commit it to the trunk  
> (slated for 2.0 RSN), make a 1.1 branch from the 1.1a tag and  
> commit it on the branch, and make a 1.1 release and a 2.0a release.
>
> Thanks again
>
> Gary
>



More information about the Zope3-dev mailing list