Cheryl Sabella added the comment:

Questions about outwin.py:

1. Should a main() be added for htest and unittest?

2. In _file_line_helper, to test if the file exists, the file is opened, then 
closed.  Would os.path.isfile work here?

Questions about tests:
1. OutputWindow is an EditorWindow and EditorWindow has a superclass of Object. 
 I didn't know how to make tests to test the text binding for goto-file-line.  
Or how to test the other functions.  I tried emulating the dialogs, but 
couldn't get it to work.  Is there any existing test for another module I can 
study and copy?  EditorWindow didn't really have any tests for this yet, but if 
I learn how to do it here, I can apply it there.

2. The `goto_line_file` function compiles the class attribute for the matching 
patterns `file_line_pats` which is then used by `_file_line_helper`.  I had 
trouble writing a test just for the helper without copying this pattern compile 
code from the other function.  I wasn't sure how to get around that.  Are the 
patterns at the class level so that they are cahced for all the calls?  How 
should I change the test?  Can the patterns be compiled inside 
`_file_line_helper`?

3.  Is the test of `_file_line_helper` the right way to go with the tests?  
Should examples of each pattern be included?  I didn't add a test for the 
TypeError because the pattens didn't seem like they would match on anything but 
digits.  Should I add a pattern for testing just for code coverage?

Thanks!

----------

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

Reply via email to