[Tutor] testing framework

spir denis.spir at free.fr
Thu Apr 23 14:55:59 CEST 2009


Hello,

I would like to refactor tests of an application in a consistent form. I have a ton of tests for each module, but they are all ad hoc things.
doctest looks great. The issue is it seems based on command line-like testing:

"""
This is the "example" module.

The example module supplies one function, factorial().  For example,

>>> import example
>>> example.factorial(5)
120
"""

My app is about parsing, which input and output usually both are big and complicated *strings*. So that I find the command line model really unappropriate for expressing test cases and their expected results.

Any hint/pointer/comment welcome,

Denis
------
la vita e estrany


More information about the Tutor mailing list