Skip to content

Commit d292a81

Browse files
committed
tests: Make io test cleanup after itself by removing 'testfile'.
1 parent 22ff397 commit d292a81

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/io/open_append.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
print("SKIP")
99
sys.exit()
1010

11+
# cleanup in case testfile exists
1112
try:
1213
os.unlink("testfile")
1314
except OSError:
@@ -29,3 +30,9 @@
2930
f = open("testfile")
3031
print(f.read())
3132
f.close()
33+
34+
# cleanup
35+
try:
36+
os.unlink("testfile")
37+
except OSError:
38+
pass

0 commit comments

Comments
 (0)