[issue24054] Invalid syntax in inspect_fodder2.py (on Python 2.x)

2015-05-05 Thread David D. Riddle
David D. Riddle added the comment: Here is another patch. I fixed a bug in GetLineTestsBadData.test_getline and refactored the code. I think everything is good now. As for the ResourceWarnings they are not caused by linecache. The problem is with tokenize.open (See http://bugs.python.org

[issue24054] Invalid syntax in inspect_fodder2.py (on Python 2.x)

2015-05-04 Thread David D. Riddle
David D. Riddle added the comment: I have made the changes you suggested. Please tell me if any further changes are needed. The unclosed file suggests a cleanup bug in linecache which we should fix for hygiene, but is separate :) Should I file a bug report? -- Added file: http

[issue24054] Invalid syntax in inspect_fodder2.py (on Python 2.x)

2015-05-01 Thread David D. Riddle
David D. Riddle added the comment: I have made the changes you suggested. Please look at lines 87-97. I am not certain if that is correct behavior. I was surprised that a SyntaxError is thrown in addition to the UnicodeDecodeError when linecache.getlines takes a file with bad unicode. Please

[issue24054] Invalid syntax in inspect_fodder2.py (on Python 2.x)

2015-04-24 Thread David D. Riddle
New submission from David D. Riddle: test_linecache.py reads from three files namely inspect_fodder.py, inspect_fodder2.py, and mapping_tests.py. It reads the py files directly as text files. This patch copies these files to linecache_fodder, linecache_fodder2, and linecache_mapping_fodder