diff options
| author | csabella <cheryl.sabella@gmail.com> | 2017-06-29 22:42:17 (GMT) |
|---|---|---|
| committer | terryjreedy <tjreedy@udel.edu> | 2017-06-29 22:42:17 (GMT) |
| commit | 42bc8beadd49f60cc52fdc397897b3bd81640406 (patch) | |
| tree | 5c61554842c2156ef44ee64eb835c44bc9621ab8 /Lib/idlelib/idle_test/htest.py | |
| parent | 18974c35ad9d25ffea041dc0363dc01889f4a595 (diff) | |
| download | cpython-42bc8beadd49f60cc52fdc397897b3bd81640406.zip cpython-42bc8beadd49f60cc52fdc397897b3bd81640406.tar.gz cpython-42bc8beadd49f60cc52fdc397897b3bd81640406.tar.bz2 | |
bpo-30495: IDLE: improve textview with docstrings, PEP8 names, more tests. (#2283)
Split TextViewer class into ViewWindow, ViewFrame, and TextFrame classes so that instances
of the latter two can be placed with other widgets within a multiframe window.
Patch by Cheryl Sabella.
Diffstat (limited to 'Lib/idlelib/idle_test/htest.py')
| -rw-r--r-- | Lib/idlelib/idle_test/htest.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Lib/idlelib/idle_test/htest.py b/Lib/idlelib/idle_test/htest.py index 6f676ae..e483bbc 100644 --- a/Lib/idlelib/idle_test/htest.py +++ b/Lib/idlelib/idle_test/htest.py @@ -8,7 +8,7 @@ callable in the module named in the spec. Close the window to skip or end the test. In a tested module, let X be a global name bound to a callable (class -or function) whose .__name__ attrubute is also X (the usual situation). +or function) whose .__name__ attribute is also X (the usual situation). The first parameter of X must be 'parent'. When called, the parent argument will be the root window. X must create a child Toplevel window (or subclass thereof). The Toplevel may be a test widget or @@ -306,15 +306,6 @@ _tabbed_pages_spec = { "<nothing> is an invalid add page and remove page name.\n" } -TextViewer_spec = { - 'file': 'textview', - 'kwds': {'title': 'Test textview', - 'text':'The quick brown fox jumps over the lazy dog.\n'*35, - '_htest': True}, - 'msg': "Test for read-only property of text.\n" - "Text is selectable. Window is scrollable.", - } - _tooltip_spec = { 'file': 'tooltip', 'kwds': {}, @@ -338,6 +329,15 @@ _undo_delegator_spec = { "by printing to the console or the IDLE shell.\n" } +ViewWindow_spec = { + 'file': 'textview', + 'kwds': {'title': 'Test textview', + 'text': 'The quick brown fox jumps over the lazy dog.\n'*35, + '_htest': True}, + 'msg': "Test for read-only property of text.\n" + "Select text, scroll window, close" + } + _widget_redirector_spec = { 'file': 'redirector', 'kwds': {}, |
