[TIP] Functions for tests instead of classes
ryan.freckleton at gmail.com
Thu Mar 4 14:03:04 PST 2010
On Wed, Mar 3, 2010 at 12:15 PM, Michael Foord <fuzzyman at voidspace.org.uk>wrote:
> Once Holger and Benjamin have worked on their ast transformation code it
> should be possible to add this to simpletest for better failure messages
> with plain asserts.
Does that mean we're going to get pretty asserts through ast transforms? As
assert obj.froddle() == "baz"
gets transformed into like (or at least functionally equivalent to):
result = object.froddle()
expected = "baz"
assert result == expected, "%s != %s" % (result, expected)
If so, that's fantastic! The same thought crossed my mind to implement that
with ast transforms, but I don't have enough ast-fu to implement it.
--Ryan E. Freckleton
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python