Message299599
The next blockers are the tests for the other 3 tabs: #31001, #31002, #31093.
Steps for converting block of ConfigDialog methods for tab X into a class. Steps are updated from #31050.
* In create_widgets, change 'self.create_page_/highlight/keys/extensions/' to '/High/Keys/Ext/Page(note)'.
* In load_configs, comment-out load_X_cfgs. If there is no problem moving all these calls into the class inits, method will be deleted.
* Copy the block for X into its appropriate position after class FontPage.
* Comment out old code.
* Before the copy, add 'class XPage(Frame):' and def __init__ as given in the outline.
* In the 'create_page_x' method, at the top, Pass 'self' instead of 'parent' as tk Var masters;
* delete 'frame = dialog.tabpages...';
* replace 'frame' with 'self' as master for widgets that used 'frame';
* delete 'return frame' at end.
After tests pass with revision above, delete original block of methods.
I have considered doing this before writing tests, but I don't quite feel comfortable doing so. To convert tests written first:
* change 'XTest' to 'XPageTest' where 2nd X is abbreviated form.
* change setUpClass similarly as in FontPageTest;
* change test functions similarly as in FontPageTest; change 'dialog' to 'self.page' and 'd = dialog' to 'd = self.page'.
* make other changes needed to keep tests passing, but there may not be any more changes needed. |
|
Date |
User |
Action |
Args |
2017-08-01 05:27:27 | terry.reedy | set | recipients:
+ terry.reedy, cheryl.sabella |
2017-08-01 05:27:27 | terry.reedy | set | messageid: <1501565247.7.0.709630480221.issue31083@psf.upfronthosting.co.za> |
2017-08-01 05:27:27 | terry.reedy | link | issue31083 messages |
2017-08-01 05:27:26 | terry.reedy | create | |
|