Author pitrou
Recipients pitrou, vstinner
Date 2011-05-25.14:10:57
SpamBayes Score 0.0518044
Marked as misclassified No
Message-id <1306332657.66.0.111012266877.issue12175@psf.upfronthosting.co.za>
In-reply-to
Content
+            raw = f
+            if hasattr(raw, 'buffer'):
+                raw = raw.buffer
+            if hasattr(raw, 'raw'):
+                raw = raw.raw
             f.close()
             self.assertRaises(ValueError, f.flush)
             self.assertRaises(ValueError, f.fileno)
@@ -2512,6 +2517,7 @@ class MiscIOTest(unittest.TestCase):
             self.assertRaises(ValueError, f.read)
             if hasattr(f, "read1"):
                 self.assertRaises(ValueError, f.read1, 1024)
+            self.assertRaises(ValueError, raw.readall)

Why not simply:

             if hasattr(f, "readall"):
                 self.assertRaises(ValueError, f.readall, 1024)
History
Date User Action Args
2011-05-25 14:10:57pitrousetrecipients: + pitrou, vstinner
2011-05-25 14:10:57pitrousetmessageid: <1306332657.66.0.111012266877.issue12175@psf.upfronthosting.co.za>
2011-05-25 14:10:57pitroulinkissue12175 messages
2011-05-25 14:10:57pitroucreate