Message193220
Added tests for FormatParagraph using single/multiline comment blocks and single/multiline strings in the mock editor window.
Here is a summary of the changes:
FormatParagraph.py
- description for format_paragraph_event
- modified so that selecting a long comment line will comment the new wrapped line
- if __name__ == __main__"...
mock_tk.py
- FormatParagraph uses the 'insert' tag, so I implemented tag_add using a dict (not sure if this is the best option...)
- index returns '' if the index refers to selection that doesn't exist (this replicates the real Text widget). It does this by excepting a TypeError and I'm guessing there is a better way to do it than this.
- tags (i.e. 'sel.first') can be set to 'end' or other indexes which would not work with a regular Text widget, but it may be useful here.
mock_idle.py
- added undo start/stop for the mock text widget
- used 'sel.first' and 'sel.last' for get_selection_indices()
test_rstrip.py
- This test used the 'insert' tag, so I set 'insert' to an index to keep the tests passing.
test_text.py
- Same issue with 'insert' as test_rstrip
Should I be submitting multiple patches for these changes or is it ok to combine them? I was also wondering if it would be a good idea to split up the FormatParagraph tests into separate tests. |
|
Date |
User |
Action |
Args |
2013-07-17 10:25:28 | philwebster | set | recipients:
+ philwebster, terry.reedy, Todd.Rovito, JayKrish |
2013-07-17 10:25:28 | philwebster | set | messageid: <1374056728.05.0.688951810625.issue18226@psf.upfronthosting.co.za> |
2013-07-17 10:25:28 | philwebster | link | issue18226 messages |
2013-07-17 10:25:27 | philwebster | create | |
|