]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Some other tests, when failing, don't always remove their TESTFN file.
authorGuido van Rossum <guido@python.org>
Tue, 10 Apr 2001 15:01:20 +0000 (15:01 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 10 Apr 2001 15:01:20 +0000 (15:01 +0000)
Try to do it for them, so our mkdir() operation doesn't fail.

Lib/test/test_mailbox.py

index 382a42e774fc618bc1eaef8f66cbcba5fb80530b..1d1a063720572203a4e8ccb243dc8a030c31228b 100644 (file)
@@ -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")