summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--tests/io/open_append.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/io/open_append.py b/tests/io/open_append.py
index fb76d09c42..da420a16ea 100644
--- a/tests/io/open_append.py
+++ b/tests/io/open_append.py
@@ -8,6 +8,7 @@ if not hasattr(os, "unlink"):
print("SKIP")
sys.exit()
+# cleanup in case testfile exists
try:
os.unlink("testfile")
except OSError:
@@ -29,3 +30,9 @@ f.close()
f = open("testfile")
print(f.read())
f.close()
+
+# cleanup
+try:
+ os.unlink("testfile")
+except OSError:
+ pass