diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2008-03-24 06:18:09 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2008-03-24 06:18:09 (GMT) |
commit | e7789b186d640ee00e5709fcfbeca43780d379e4 (patch) | |
tree | e11a757bac8516d8c17b5aa3882f7048f9916b93 /Lib/test/test_gzip.py | |
parent | 2595e7606c62486405f69c04ef21e6af8bbd9a04 (diff) | |
download | cpython-e7789b186d640ee00e5709fcfbeca43780d379e4.zip cpython-e7789b186d640ee00e5709fcfbeca43780d379e4.tar.gz cpython-e7789b186d640ee00e5709fcfbeca43780d379e4.tar.bz2 |
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_gzip.py')
-rw-r--r-- | Lib/test/test_gzip.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/test/test_gzip.py b/Lib/test/test_gzip.py index 08f7f3f..0010112 100644 --- a/Lib/test/test_gzip.py +++ b/Lib/test/test_gzip.py @@ -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): |