On some systems (e.g., Ubuntu on hppa) the flush()

doesn't cause the exception, but the close() does.

Will backport.
This commit is contained in:
Neal Norwitz 2008-01-26 23:13:46 +00:00
parent 37184295dc
commit 7f47d93f52
1 changed files with 3 additions and 0 deletions

View File

@ -53,6 +53,9 @@ class ResourceTest(unittest.TestCase):
try:
f.write("Y")
f.flush()
# On some systems (e.g., Ubuntu on hppa) the flush()
# doesn't cause the exception, but the close() does.
f.close()
except IOError:
if not limit_set:
raise