On 21 Feb, 12:30, Virgil Dupras [EMAIL PROTECTED] wrote:
Hi devs,
Specifically, I'd like to know about files managements in tests. Is
every test expected to clean after itself, or is there an automatic
cleanup mechanism in place?
I have usually seen a lot of tests implemented like this:
Virgil Dupras wrote:
On 2/21/08, Virgil Dupras [EMAIL PROTECTED] wrote:
Hi devs,
Being a python dev newbie, I look in http://www.python.org/dev/ for
some guide to write unit tests in python and I can't find any.
Specifically, I'd like to know about files managements in tests. Is
every
On 2/21/08, Nick Coghlan [EMAIL PROTECTED] wrote:
Virgil Dupras wrote:
On 2/21/08, Virgil Dupras [EMAIL PROTECTED] wrote:
Hi devs,
Being a python dev newbie, I look in http://www.python.org/dev/ for
some guide to write unit tests in python and I can't find any.
Specifically,
Guido van Rossum wrote:
I don't think so.
You could create a directory in setUp method by using tempfile.mkdtemp
and then remove it in tearDown.
Specifically, clean it up with shutil.rmtree()
And make sure you have closed all files before you rmtree() the
directory. Otherwise the unit