larry-discuss team mailing list archive
-
larry-discuss team
-
Mailing list archive
-
Message #00061
Re: Can all larry methods handle empty larrys?
On Fri, Feb 5, 2010 at 10:28 PM, Keith Goodman <kwgoodman@xxxxxxxxx> wrote:
> On Fri, Feb 5, 2010 at 7:13 PM, Keith Goodman <kwgoodman@xxxxxxxxx> wrote:
>> I'm making a unit test that passes an empty larry to all the larry
>> methods. I've tested about half the methods. So far I have found one
>> bug:
>>
>> larry([]) == larry([])
>>
>> crashes.
>
> Oh, I guess it was a bug in all the comparison operators. So that's 6
> bugs found so far. But all originating from a shared function.
very good, parametric tests, it will be easy to add a new method.
I didn't know you can use getattr this way, to use the method without
dotting it to an instance.
I had used this type of parametric tests only on class instances or
functions but never on methods.
Josef
> _______________________________________________
> Mailing list: https://launchpad.net/~larry-discuss
> Post to : larry-discuss@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~larry-discuss
> More help : https://help.launchpad.net/ListHelp
>
References