Using doctest with simple text files ?

Andy Dingley dingbat at codesmiths.com
Fri Jun 8 16:47:07 CEST 2007


I have a problem involving lots of simple text files (Java properties
files), for which I'm building Python tools to manage their contents.

I'm also writing lots of Python modules and using doctest to embed
unit tests within them. Maintenance and shhared code ownership is an
issue here.

What's the best way to test my file modification operations, within
the context of doctest-like testing?  I like the simple immediacy of
doctest and it's working well for my "in-Python" testing, but I can't
seem to find a simple way of integrating it with the resultant text
files (e.g. something like diff)

Thanks




More information about the Python-list mailing list