Message297249
Let's do it 'right'.
Step 1: Write class design in the form of a class with methods with APIs and docstrings as the bodies.
class Changes:
"""Manage a user's proposed configuation option changes.
Changes are either cancelled or applied in a single transaction.
Methods used by ConfigDialog:
meth_a does xa
Methods used only for testing (if any)
meth_t does xt for testing
Internal methods not called externally:
meth_b does xb.
"""
def __init__(self, ???): # new
"""Create configuration option change manager.
arg: bool, do we like George Boole?
"""
Temporarily comment methods as new, old, renamed from whatever.
Step 2. Test design by writing a test class with at least a few test methods. If methods are not easy to write, perhaps we should change design.
class ChangesTest(unittest.TestCase):
# no gui needed.
Step 3. Write simple, clear bodies that make tests pass.
However much you submit, I will review in that order: design, tests, implementation. |
|
Date |
User |
Action |
Args |
2017-06-29 03:23:08 | terry.reedy | set | recipients:
+ terry.reedy, cheryl.sabella |
2017-06-29 03:23:08 | terry.reedy | set | messageid: <1498706588.29.0.0599137000121.issue30779@psf.upfronthosting.co.za> |
2017-06-29 03:23:08 | terry.reedy | link | issue30779 messages |
2017-06-29 03:23:07 | terry.reedy | create | |
|