This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zach.ware
Recipients benjamin.peterson, docs@python, gromgull, hynek, pitrou, python-dev, r.david.murray, serhiy.storchaka, stutzbach, vajrasky, zach.ware
Date 2014-02-27.14:42:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1393512172.01.0.661777275097.issue20501@psf.upfronthosting.co.za>
In-reply-to
Content
Agreed with Vajrasky, the 2.7 commit wasn't as clean as it could be (sorry I didn't get an actual review done before you committed, I posted my last test results in a bit of a hurry).  The commented out line should either be removed, or used instead of the 'with' block above it.  I would actually vote for using writeTmp, and make a new issue for making writeTmp use a context manager.

Also, I think the new test_readline could be made a little clearer by putting

+        fi = FileInput(files=TESTFN, openhook=hook_encoded('ascii'), bufsize=8)
+        self.assertEqual(fi.readline(), u'A\n')
+        self.assertEqual(fi.readline(), u'B\r\n')
+        self.assertEqual(fi.readline(), u'C\r')

inside a `try ... except UnicodeDecodeError: self.fail('Read to end of file')` block.
History
Date User Action Args
2014-02-27 14:42:52zach.waresetrecipients: + zach.ware, pitrou, benjamin.peterson, stutzbach, r.david.murray, docs@python, python-dev, gromgull, hynek, serhiy.storchaka, vajrasky
2014-02-27 14:42:52zach.waresetmessageid: <1393512172.01.0.661777275097.issue20501@psf.upfronthosting.co.za>
2014-02-27 14:42:51zach.warelinkissue20501 messages
2014-02-27 14:42:51zach.warecreate