[Python-checkins] r60330 - python/trunk/Lib/test/test_resource.py
neal.norwitz
python-checkins at python.org
Sat Jan 26 22:02:45 CET 2008
Author: neal.norwitz
Date: Sat Jan 26 22:02:45 2008
New Revision: 60330
Modified:
python/trunk/Lib/test/test_resource.py
Log:
Always try to remove the test file even if close raises an exception
Modified: python/trunk/Lib/test/test_resource.py
==============================================================================
--- python/trunk/Lib/test/test_resource.py (original)
+++ python/trunk/Lib/test/test_resource.py Sat Jan 26 22:02:45 2008
@@ -15,7 +15,6 @@
self.assertRaises(TypeError, resource.setrlimit, 42, 42, 42)
def test_fsize_ismax(self):
-
try:
(cur, max) = resource.getrlimit(resource.RLIMIT_FSIZE)
except AttributeError:
@@ -63,10 +62,10 @@
resource.setrlimit(resource.RLIMIT_FSIZE, (cur, max))
finally:
f.close()
- os.unlink(test_support.TESTFN)
finally:
if limit_set:
resource.setrlimit(resource.RLIMIT_FSIZE, (cur, max))
+ test_support.unlink(test_support.TESTFN)
def test_fsize_toobig(self):
# Be sure that setrlimit is checking for really large values
More information about the Python-checkins
mailing list