unittest of file-reading function

shafran shafranov at gmail.com
Tue Oct 18 15:54:27 EDT 2005


Hi!

You can use tempfile.mktemp(), then write test contents to this temp
file,
pass it to your function, unlink tempfile.

you can create / unlink temp file in setUp() / tearDown() methods.

Alexander.




More information about the Python-list mailing list