]> granicus.if.org Git - python/commitdiff
Update the comment and remove the close. If we close we can't flush anymore.
authorNeal Norwitz <nnorwitz@gmail.com>
Sun, 27 Jan 2008 18:09:48 +0000 (18:09 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sun, 27 Jan 2008 18:09:48 +0000 (18:09 +0000)
We might still need to close after the for loop if flushing 6! times still
doesn't cause the signal/exception.

Lib/test/test_resource.py

index 496259f6320013e1427d824379eded67f70fc6ac..225f88278deac9ab5de814c05653ea10cc520c21 100644 (file)
@@ -56,13 +56,12 @@ class ResourceTest(unittest.TestCase):
                         f.flush()
                         # On some systems (e.g., Ubuntu on hppa) the flush()
                         # doesn't always cause the exception, but the close()
-                        # does eventually.  Try closing several times in
+                        # does eventually.  Try flushing several times in
                         # an attempt to ensure the file is really synced and
                         # the exception raised.
                         for i in range(5):
                             time.sleep(.1)
                             f.flush()
-                            f.close()
                     except IOError:
                         if not limit_set:
                             raise