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 xtreak
Recipients jonathan.huot, xtreak
Date 2018-11-12.07:05:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1542006332.19.0.788709270274.issue31541@psf.upfronthosting.co.za>
In-reply-to
Content
mock can only verify if the function is called with the correct number of arguments as you have passed spec. It doesn't verify whether the function implementation is correct like calling Something.foobar() because it's not designed to verify the function implementation. It wouldn't raise an exception even when self.foo(1, 2) is called inside x.bar because runtime code is not executed and only the signature is checked with mock. I think this is an expected behavior and not a bug.
History
Date User Action Args
2018-11-12 07:05:32xtreaksetrecipients: + xtreak, jonathan.huot
2018-11-12 07:05:32xtreaksetmessageid: <1542006332.19.0.788709270274.issue31541@psf.upfronthosting.co.za>
2018-11-12 07:05:32xtreaklinkissue31541 messages
2018-11-12 07:05:32xtreakcreate