diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py index 29ce35bb0b3..28876e3a211 100644 --- a/Lib/test/test_resource.py +++ b/Lib/test/test_resource.py @@ -36,6 +36,9 @@ try: 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