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 davidszotten@gmail.com
Recipients davidszotten@gmail.com
Date 2016-01-28.14:08:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1453990097.49.0.0657857764216.issue26232@psf.upfronthosting.co.za>
In-reply-to
Content
Unless i misunderstand the docs, i would expect `Mock(foo)` to have the same effect as `create_autospec(foo)`, but that doesn't appear to be the case:

>>> m1 = mock.Mock(spec=lambda: None)
>>> m2 = mock.create_autospec(spec=lambda: None)
>>> m1(1)
<Mock name='mock()' id='4377526960'>
>>> m2(1)
# snip
TypeError: too many positional arguments
History
Date User Action Args
2016-01-28 14:08:17davidszotten@gmail.comsetrecipients: + davidszotten@gmail.com
2016-01-28 14:08:17davidszotten@gmail.comsetmessageid: <1453990097.49.0.0657857764216.issue26232@psf.upfronthosting.co.za>
2016-01-28 14:08:17davidszotten@gmail.comlinkissue26232 messages
2016-01-28 14:08:17davidszotten@gmail.comcreate