[issue18365] Idle: mock Text class and test thereof

Terry J. Reedy report at bugs.python.org
Thu Jul 11 23:34:23 CEST 2013


Terry J. Reedy added the comment:

Upon further review and tests, I notice that ._decode
* is a partial implementation of Text.index,
* so it should be renamed index and tested against Text.index,
* and it currently returns the wrong values for 'end' and high out-of-bounds indexes.

Tests with 'end' only pass now because the tested methods ignore the buggy decode for 'end' and special-case it instead. When I added tests with out of bounds indexes, they failed. I am working now on fixing all this.

Spaces are supposed to follow arg-separating commas in function calls. The initial patch lacked them and I have added them. I need them because they make code easier for *me* to read and review, which is an example of why PEP-8 requires them.

----------

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


More information about the Python-bugs-list mailing list