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 ezio.melotti, michael.foord, pitrou
Date 2013-02-11.14:03:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1360591381.45.0.220577890028.issue17063@psf.upfronthosting.co.za>
In-reply-to
Content
I still don't particularly like the idea of the assert_* methods returning something.

If the call args tuples had args and kwargs attributes, for which there are outstanding feature requests, then you could simply do:

my_mock(1, someobj(), bar=someotherobj())

foo = my_mock.call_args.args[1]
bar = my_mock.call_args.kwargs['bar']

By avoiding the extra step of tuple unpacking this is still nice and readable (IMO).
History
Date User Action Args
2013-02-11 14:03:01michael.foordsetrecipients: + michael.foord, pitrou, ezio.melotti
2013-02-11 14:03:01michael.foordsetmessageid: <1360591381.45.0.220577890028.issue17063@psf.upfronthosting.co.za>
2013-02-11 14:03:01michael.foordlinkissue17063 messages
2013-02-11 14:03:01michael.foordcreate