Ethan Furman added the comment:

CliffM added the comment:
>
> Sorry -- I could have been clearer :
>
> The conditional:
>
>   if member.value == value:
>
> Is redundant as the tests stand.  If you comment it out -- everything works. 
> So therefore we are missing a test.

Are you saying that you are commenting out the if test, but leaving in the 
return member?

> This makes the if-clause fragile for future maintenance.  So we need another 
> test to ensure the loop is covered.

In case Python for loops suddenly stop working?

Sorry to be so dense, but I am not understanding the point you are trying to 
make... ahhhhhh!  Are trying to guard 
against the possibility that in the future someone might accidentally delete 
the if test, and the unit test won't catch 
it?  That certainly is a good reason to test values further into the loop.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19252>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to