Using doctest with simple text files ?

A

Andy Dingley

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top