summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_gzip.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2008-04-10 05:46:39 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2008-04-10 05:46:39 (GMT)
commit36a59b4a08ec297d0caabd5ff60375f6fd1d236f (patch)
tree30917ed4ac648a98e8200398cf30afba04d3926b /Lib/test/test_gzip.py
parent60a819d681d1004a9703b050501b70912f40b1ed (diff)
downloadcpython-36a59b4a08ec297d0caabd5ff60375f6fd1d236f.zip
cpython-36a59b4a08ec297d0caabd5ff60375f6fd1d236f.tar.gz
cpython-36a59b4a08ec297d0caabd5ff60375f6fd1d236f.tar.bz2
Remove the test file before writing it in case there is no write permission.
This might help fix some of the failures on Windows box(es). It doesn't hurt either way and ensure the tests are a little more self contained (ie have less assumptions).
Diffstat (limited to 'Lib/test/test_gzip.py')
-rw-r--r--Lib/test/test_gzip.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/test/test_gzip.py b/Lib/test/test_gzip.py
index 1704a60..a1a267e 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):