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

@ -25,13 +25,10 @@ class TestGzip(unittest.TestCase):
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):