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.