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 tim.golden
Recipients eryksun, paul.moore, steve.dower, tim.golden, zach.ware
Date 2020-06-12.05:41:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1591940503.74.0.265895171455.issue40913@roundup.psfhosted.org>
In-reply-to
Content
Thanks, Eryk. I've had a couple of casts at this (and also with an eye to https://bugs.python.org/issue40912 in a very similar area).

Trouble is I can't come up with a way of adding a set.. function which doesn't seem wholly artificial, given that it's basically creating an anonymous event and checking its return. I can't come up with a non-testing scenario where the ability to override would be useful.

If I understand your proposal, a tentative "set..." function would have to take a HANDLE parameter so that it could be overridden by a test? That means its normal use would be something like:

setSigintEvent(CreateEvent(NULL, ....));

so either the error checking for that would be inside the function, which feels weird, or would happen outside, which feels like the functions not doing anything. (I appreciate I may be overthinking here).

I'm very much open to suggestions here, but it seems to me that either:

We make the (simple) change without tests;

or we add a setSigintEvent function as above whose only purpose is to be overridden -- and then only for testing.
History
Date User Action Args
2020-06-12 05:41:43tim.goldensetrecipients: + tim.golden, paul.moore, zach.ware, eryksun, steve.dower
2020-06-12 05:41:43tim.goldensetmessageid: <1591940503.74.0.265895171455.issue40913@roundup.psfhosted.org>
2020-06-12 05:41:43tim.goldenlinkissue40913 messages
2020-06-12 05:41:43tim.goldencreate