[Python-Dev] [Python-checkins] r86000 - python/branches/py3k/Lib/test/test_fileio.py (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Sun Oct 31 15:20:05 CET 2010
- Previous message: [Python-Dev] [Python-checkins] r85902 - in python/branches/py3k/Lib: os.py test/test_os.py
- Next message: [Python-Dev] [Python-checkins] r86000 - python/branches/py3k/Lib/test/test_fileio.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Oct 31, 2010 at 9:56 AM, brian.curtin <python-checkins at python.org> wrote:
Author: brian.curtin Date: Sun Oct 31 01:56:45 2010 New Revision: 86000
Log: Fix ResourceWarning about unclosed file
Modified: python/branches/py3k/Lib/test/testfileio.py Modified: python/branches/py3k/Lib/test/testfileio.py ============================================================================== --- python/branches/py3k/Lib/test/testfileio.py (original) +++ python/branches/py3k/Lib/test/testfileio.py Sun Oct 31 01:56:45 2010 @@ -260,7 +260,6 @@ # OS'es that don't support /dev/tty. pass else: - f = FileIO("/dev/tty", "a") self.assertEquals(f.readable(), False) self.assertEquals(f.writable(), True) _if sys.platform != "darwin" and _
Doesn't that delete the file object that the next two lines are trying to test?
Cheers, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message: [Python-Dev] [Python-checkins] r85902 - in python/branches/py3k/Lib: os.py test/test_os.py
- Next message: [Python-Dev] [Python-checkins] r86000 - python/branches/py3k/Lib/test/test_fileio.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]