Author veky
Recipients Guillaume Chorn, michael.foord, r.david.murray, rbcollins, veky
Date 2016-10-04.05:34:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> # passes, even though we didn't make the exact same call twice!

Weird. It looks like a matter of perspective, but to me it surely _does_ seem like you _did_ make the exact same call twice.

> test_function(arg)
> test_function(arg)

Neither test_function nor arg were rebound in the meantime. (If there's a "bug", it's a subtle thing that += seems like rebinding, and in fact it does rebind immutable objects. But that's off topic here.)

[*Also, it could be argued that assert_has_calls should compare the arguments with `is` instead of `==`, but that would probably break too many things.]

But let's try to be constructive. IIRC, unittest was modelled after Java's analogous library. Can someone check how Java solves this? I'm pretty sure it has the same "problem" (when arguments are objects), but maybe it keeps the reference semantics totally as conjectured in the previous paragraph.
Date User Action Args
2016-10-04 05:34:03vekysetrecipients: + veky, rbcollins, r.david.murray, michael.foord, Guillaume Chorn
2016-10-04 05:34:03vekysetmessageid: <>
2016-10-04 05:34:03vekylinkissue28318 messages
2016-10-04 05:34:01vekycreate