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 phlogistonjohn
Recipients neologix, phlogistonjohn, vinay.sajip
Date 2012-04-22.18:41:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1335120117.92.0.0997506841347.issue14632@psf.upfronthosting.co.za>
In-reply-to
Content
Thank you both for looking at this. I've added an updated version of the patch that incorporates the last two suggestions that Charles-François made.

I agree that this test may not be appropriate for the python test suite, due to the length and non-determinism of the test. I don't know what the suite's policy on monkey patching stdlib in the tests is, but monkey patching either os.path.exists or os.stat to remove the file at the appropriate time could be one way to make the test fast and deterministic. Seems a bit dirty to me though. :-)
 
I am up for adding some kind of test to the suite for the WatchedFileHandler, though.

I'm pretty ambivalent about keeping the whole stat structure around, since the samestat method is just a wrapper around what the emit function is already doing, and we'd be keeping more memory (although a small amount) around. I doubt we'd want to look at the timestamps because they could legitimately change in ways this check doesn't care about.
History
Date User Action Args
2012-04-22 18:41:58phlogistonjohnsetrecipients: + phlogistonjohn, vinay.sajip, neologix
2012-04-22 18:41:57phlogistonjohnsetmessageid: <1335120117.92.0.0997506841347.issue14632@psf.upfronthosting.co.za>
2012-04-22 18:41:57phlogistonjohnlinkissue14632 messages
2012-04-22 18:41:57phlogistonjohncreate