[TIP] Announcing Expecter Gadget

Gary Bernhardt gary.bernhardt at gmail.com
Mon Mar 8 13:34:43 PST 2010


On Mon, Mar 8, 2010 at 10:24 AM, Tim Hatch <tim at timhatch.com> wrote:
> For the "is in" case at least, you could put the expect on the RHS...
>
>    my_obj in expect(['option1', 'option2'])
>
> But that would probably get confusing just like the order of args to
> assertEqual :)

Right – that would be inconsistent with the rest of the library. I'm
not interested in dogmatically pursuing expectations that always read
like English, but I am interested in always putting the expect around
the actual value so we never forget the order again! :)

-- 
Gary
http://blog.extracheese.org



More information about the testing-in-python mailing list