Message136846
| Author |
pitrou |
| Recipients |
pitrou, vstinner |
| Date |
2011年05月25日.14:10:57 |
| SpamBayes Score |
0.051804427 |
| 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:57 | pitrou | set | recipients:
+ pitrou, vstinner |
| 2011年05月25日 14:10:57 | pitrou | set | messageid: <1306332657.66.0.111012266877.issue12175@psf.upfronthosting.co.za> |
| 2011年05月25日 14:10:57 | pitrou | link | issue12175 messages |
| 2011年05月25日 14:10:57 | pitrou | create |
|