doctest lets you test your code by running examples embedded in
the documentation and verifying that they produce the expected
results. It works by parsing the help text to find examples, running
them, then comparing the output text against the expected value. Many
developers find doctest easier than unittest because in
its simplest form, there is no API to learn before using it. However,
as the examples become more complex the lack of fixture management can
make writing doctest tests more cumbersome than using
unittest.
Code Interstices All the little things that happen between bouts of coding. Covering internet technologies, Python, Mac OS X, and open source.
Sunday, August 15, 2010
PyMOTW: doctest - Testing through documentation
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment