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 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 <1453196368.14.0.739879034236.issue26140@psf.upfronthosting.co.za>
In-reply-to
Content
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.)
History
Date User Action Args
2016-01-19 09:39:28michael.foordsetrecipients: + michael.foord, gvanrossum, vstinner, yselivanov, miyakogi
2016-01-19 09:39:28michael.foordsetmessageid: <1453196368.14.0.739879034236.issue26140@psf.upfronthosting.co.za>
2016-01-19 09:39:28michael.foordlinkissue26140 messages
2016-01-19 09:39:27michael.foordcreate