This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cheryl.sabella
Recipients cheryl.sabella, terry.reedy
Date 2017-06-09.22:05:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Questions about

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?

Date User Action Args
2017-06-09 22:05:42cheryl.sabellasetrecipients: + cheryl.sabella, terry.reedy
2017-06-09 22:05:42cheryl.sabellasetmessageid: <>
2017-06-09 22:05:42cheryl.sabellalinkissue30617 messages
2017-06-09 22:05:42cheryl.sabellacreate