Re: [Pyunit-interest] Assert Equals
Brought to you by:
purcell
From: Michal W. <sa...@ma...> - 2000-06-10 13:47:14
|
On Sat, 10 Jun 2000, Nathan Heagy wrote: > I've been playing with other language's testing frameworks (based on > junit) and I really like the assertequals functions. This the expected > and received values on error. In php this is done similar to > > this.assertequals(value_one, value_two) > > also, php does not use the built-in assert, it uses a > > this.assert(value_one > value_two) > > Is there any interest to implementing either of these in PyUnit? I'm > interested in both, and will probably add atleast assertequals to my own > copy. Hey Nathan, It seems to me that the built-in python syntax is actually more concise: >>> assert value_one == value_two and: >>> assert value_one > value_two .. Plus you can add a helpful message: >>> assert value_one > value_two, "value_one should have been > than value_two" Is that not what you want? Cheers, - Michal ------------------------------------------------------------------------ Zike Interactive http://www.zike.net/ http://zike.sourceforge.net/ ------------------------------------------------------------------------ |