Author garethmjwilliams
Recipients garethmjwilliams
Date 2021-07-23.23:38:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
unitest.mock.patch does not work well when applied as a decorator to a function which is a generator.

It results in the function being changed from a generator function (co_flags 99) to a non-generator (co_flag 31) and the patch is not applied.

[I have a MWE, attached, and fairly simple fix, to the file, which I will put up as a PR in due course. This is the first time I've submitted a bug or PR, so apologies if I've not done this particularly well.]
Date User Action Args
2021-07-23 23:38:41garethmjwilliamssetrecipients: + garethmjwilliams
2021-07-23 23:38:41garethmjwilliamssetmessageid: <>
2021-07-23 23:38:41garethmjwilliamslinkissue44730 messages
2021-07-23 23:38:41garethmjwilliamscreate