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.
Description: Binary data
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
_______________________________________________ Zope3-dev mailing list Zope3firstname.lastname@example.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com