From 75ebb29f88def196ec8486c7ad1f717a211dd146 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 10 Apr 2001 15:01:20 +0000 Subject: Some other tests, when failing, don't always remove their TESTFN file. Try to do it for them, so our mkdir() operation doesn't fail. --- Lib/test/test_mailbox.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lib/test/test_mailbox.py b/Lib/test/test_mailbox.py index 382a42e..1d1a063 100644 --- a/Lib/test/test_mailbox.py +++ b/Lib/test/test_mailbox.py @@ -2,6 +2,12 @@ import mailbox import os import test_support +# cleanup +try: + os.unlink(test_support.TESTFN) +except os.error: + pass + # create a new maildir mailbox to work with: curdir = os.path.join(test_support.TESTFN, "cur") newdir = os.path.join(test_support.TESTFN, "new") -- cgit v0.12