| 403 | test_kwds = None |
| 404 | |
| 405 | def next_test(): |
| 406 | nonlocal test_name, callable_object, test_kwds |
| 407 | if len(test_list) == 1: |
| 408 | next_button.pack_forget() |
| 409 | test_spec, callable_object = test_list.pop() |
| 410 | test_kwds = test_spec['kwds'] |
| 411 | test_name.set('Test ' + test_spec['name']) |
| 412 | |
| 413 | text['state'] = 'normal' # Enable text replacement. |
| 414 | text.delete('1.0', 'end') |
| 415 | text.insert("1.0", test_spec['msg']) |
| 416 | text['state'] = 'disabled' # Restore read-only property. |
| 417 | |
| 418 | def run_test(_=None): |
| 419 | widget = callable_object(root, **test_kwds) |