Hello
Suppose we want to test an 'add' function, which we will call 'f'. How about writing:
f(2, 2) == 4
What could be simpler than that. And for exceptions:
f(2, "a string") ** ValueError
where we use '**' to mean 'raises'.
This is the basic philosophy of python-testutil:
http://bitbucket.org/jfine/python-testutil/Notice that in the above I did not specify the programming language. In other words, the test I wrote is language independent and can be used with multiple languages, such as JavaScript and Python.
For this reason, I'm suggesting that py2js think about using python-testutil (which isn't quite ready for use just now).
--
Jonathan
--
You received this message because you are subscribed to the Google Groups "JavaScript for Python programmers" group.
To post to this group, send an email to
js...@googlegroups.com.
To unsubscribe from this group, send email to
js4py+un...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/js4py?hl=en-GB.