diff options
author | Damien George <damien.p.george@gmail.com> | 2015-08-21 08:45:52 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-08-21 08:45:52 +0100 |
commit | d292a81e95bd558f3902f88fa4d6d5641a4aa388 (patch) | |
tree | 8a4a98af77dfed0786b5ac8cc92ecb39029fa9b1 /tests/io/open_append.py | |
parent | 22ff397fb11fac323607ef2e51d81a4ed96c2c50 (diff) | |
download | micropython-d292a81e95bd558f3902f88fa4d6d5641a4aa388.tar.gz micropython-d292a81e95bd558f3902f88fa4d6d5641a4aa388.zip |
tests: Make io test cleanup after itself by removing 'testfile'.
Diffstat (limited to 'tests/io/open_append.py')
-rw-r--r-- | tests/io/open_append.py | 7 |
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 |