diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py index 09ac4d53ca7..3ff31bb33dd 100644 --- a/Lib/test/test_resource.py +++ b/Lib/test/test_resource.py @@ -53,6 +53,9 @@ def test_fsize_enforced(self): 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