[issue19252] Enum.py : Enum.__new__() : Test Coverage

CliffM report at bugs.python.org
Mon Oct 14 10:53:27 CEST 2013


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.

The current test works, as red is the first value to pop out of the value() list.  

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

It's a coverage issue -- where although the code is executed by the test, and the code is correct, the test is not complete enough for the code.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19252>
_______________________________________


More information about the Python-bugs-list mailing list