[openstack-dev] [murano] Fix order of arguments in assertEqual

Ken'ichi Ohmichi ken1ohmichi at gmail.com
Tue Sep 29 01:23:03 UTC 2015


Hi

2015-09-29 10:09 GMT+09:00 Ian Wienand <iwienand at redhat.com>:
> On 09/24/2015 08:18 PM, Andrey Kurilin wrote:
>>
>> I agree that wrong order of arguments misleads while debugging errors, BUT
>> how we can prevent regression?
>
>
> Spell it out and use keyword args?
>
>   assertEqual(expected="foo", observed=...)
>
> is pretty hard to mess up

There is a lot of this kind of patches on the gerrit for Nova also.
How about having pep8 rule for blocking this issue?
I don't think it is smart to -1 by reviewers when reviewing patches if
the patch is against the above order.

https://review.openstack.org/#/c/227650/ is trying adding the pep8 rule to Nova.

Thanks
Ken Ohmichi



More information about the OpenStack-dev mailing list