[issue21686] IDLE - Test hyperparser

Tal Einat report at bugs.python.org
Sat Jun 14 14:25:10 CEST 2014


Tal Einat added the comment:

Here are details how to trigger all of the uncovered code lines and branches, listed by line.


Uncovered lines:

Line 159: This catches would-be identifiers (variable names) which are keywords or begin with a character that can't be first (e.g. a digit). We should have at least one test for each of these cases.

Lines 196-198: These strip comments from inside an expression. We should have a test with sample code with a multi-line expression with a comment inside it.

Line 225: Triggered when trying to find an expression including parentheses or brackets when they aren't closed, e.g. "[x for x in ".


Uncovered branches (except those which just cause the above):

Lines 32, 42: To trigger, have a block of code over 50 lines long and create a HyperParser at the last line (not inside any other block).

Line 236: Have a string literal inside brackets or parens, and call get_expression().

----------

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


More information about the Python-bugs-list mailing list