Author chuck
Recipients aguiar, chuck, ezio.melotti, pitrou
Date 2009-10-05.07:13:38
SpamBayes Score 6.60416e-13
Marked as misclassified No
Message-id <1254726822.89.0.0860970649875.issue5395@psf.upfronthosting.co.za>
In-reply-to
Content
1&2) I removed the try/except around the import. I have no clue if os 
might be unavailable. Maybe leave out handling that until we see that 
breaking.

I added the try/except because I saw that in other tests in the same 
file when importing gc.

3) Done.
4) The EOFError exceptions are tested in test_tofromfile.

> I tried to apply both the patches on the trunk but the tests don't
> pass. With the latest patch I get an EOFError instead of IOError in
> the assertRaises.
That is the also behaviour before the patch, so the ferror(fp) does not 
fire. Either the test is inappropriate or your system doesn't regard 
reading a closed filehandle an error. I'm not able to investigate this 
as it works fine on my os x 10.6. What system did you test it on?

Reliable ways of producing IOErrors are harder to find than I thought. 
Deleting the file between to reads makes it just look truncated. Another 
method I tried was crashing a process which holds the other end of a 
pipe, but that's messy and complicated.
History
Date User Action Args
2009-10-05 07:13:43chucksetrecipients: + chuck, pitrou, aguiar, ezio.melotti
2009-10-05 07:13:42chucksetmessageid: <1254726822.89.0.0860970649875.issue5395@psf.upfronthosting.co.za>
2009-10-05 07:13:41chucklinkissue5395 messages
2009-10-05 07:13:39chuckcreate