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.
This commit is contained in:
Neal Norwitz 2008-03-24 06:18:09 +00:00
parent 2595e7606c
commit e7789b186d
2 changed files with 6 additions and 5 deletions

View file

@ -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)