This will hopefully avoid spurious failures if the file doesn't
have the proper permissions to write for some reason.
filename = test_support.TESTFN
def setUp (self):
- pass
+ test_support.unlink(self.filename)
def tearDown (self):
- try:
- os.unlink(self.filename)
- except os.error:
- pass
+ test_support.unlink(self.filename)
def test_write (self):
class IOTest(unittest.TestCase):
+ def setUp(self):
+ test_support.unlink(test_support.TESTFN)
+
def tearDown(self):
test_support.unlink(test_support.TESTFN)
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)