On Tue, May 13, 2008 at 12:41 PM, Jesus Cea <jcea@jcea.es> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Brett Cannon wrote: | It is up to the tests to clean up after themselves since they can be | executed directly, so there is not magical location that gets cleaned | up in case a test screws up. You can use test.test_support.TESTFN if | you want a location. Or something from tempfile.
I'm worried about the case when a test crashes and leave garbage behind... that will crash future test runs.
Then don't crash on tests. =)
I guess I would delete the directory before using it, but I guess somebody already had this problem and solved it, somehow. :-?
That's usually the other way to go about it. In your test_main() or your setUp() methods you make sure everything is clean before you start. -Brett