summaryrefslogtreecommitdiff
path: root/Lib/test/test_io.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2008-03-24 06:18:09 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2008-03-24 06:18:09 +0000
commite7789b186d640ee00e5709fcfbeca43780d379e4 (patch)
treee11a757bac8516d8c17b5aa3882f7048f9916b93 /Lib/test/test_io.py
parent2595e7606c62486405f69c04ef21e6af8bbd9a04 (diff)
downloadcpython-git-e7789b186d640ee00e5709fcfbeca43780d379e4.tar.gz
Always try to delete the data file before and after the test.
This will hopefully avoid spurious failures if the file doesn't have the proper permissions to write for some reason.
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r--Lib/test/test_io.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 513e1f3b82..f0e7931205 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -79,6 +79,9 @@ class MockNonBlockWriterIO(io.RawIOBase):
class IOTest(unittest.TestCase):
+ def setUp(self):
+ test_support.unlink(test_support.TESTFN)
+
def tearDown(self):
test_support.unlink(test_support.TESTFN)
@@ -619,6 +622,7 @@ class TextIOWrapperTest(unittest.TestCase):
def setUp(self):
self.testdata = b"AAA\r\nBBB\rCCC\r\nDDD\nEEE\r\n"
self.normalized = b"AAA\nBBB\nCCC\nDDD\nEEE\n".decode("ascii")
+ test_support.unlink(test_support.TESTFN)
def tearDown(self):
test_support.unlink(test_support.TESTFN)