Author michael.foord
Recipients gvanrossum, michael.foord, miyakogi, vstinner, yselivanov
Date 2016-01-19.09:39:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In inspect checking that __code__ is a code object, or that co_flags is an int, would be better than special casing mock. 

However, the patch to mock looks reasonable to me. It copies the whole code object from the original function to the mock object. The patch needs a test (I'd like to see a test for the Mock(func) case and the create_autospec(func) case.)
Date User Action Args
2016-01-19 09:39:28michael.foordsetrecipients: + michael.foord, gvanrossum, vstinner, yselivanov, miyakogi
2016-01-19 09:39:28michael.foordsetmessageid: <>
2016-01-19 09:39:28michael.foordlinkissue26140 messages
2016-01-19 09:39:27michael.foordcreate