<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>

Yf5                 @   se  d  Z  d d l m Z d d l m Z d d l Z d d d d d	 d
 d i d d i Z d d d i  d d i Z d d d i  d d i Z	 d d d i  d d i Z
 d d d d d d
 d i d d i Z d d d i  d d i Z d d d i  d d i Z d d d d d d d d d  h d
 d i d d! i Z d d" d d d# d
 d i d d$ i Z d d% d d d& d' d( d) d* g d
 d i d d+ i Z d d, d i  d d- i Z d d. d i  d d/ i Z d d0 d i  d d1 i Z d d2 d i  d d3 i Z d d4 d i  d d5 i Z d d6 d i  d d7 i Z d d8 d i  d d9 i Z d d: d i  d d; i Z d d< d i  d d= i Z d d> d i  d d? i Z d d@ d i  d dA i Z d dB d i  d dC i Z d dD d i  d dE i Z d dF d d dG dH dI dJ d
 d i d dK i Z d dL d i  d dM i Z d dN d i  d dO i Z  d dP d i  d dQ i Z! d dR d i  d dS i Z" dT dU   Z# e$ dV k rae#   d S)Wa  Run human tests of Idle's window, dialog, and popup widgets.

run(*tests)
Create a master Tk window.  Within that, run each callable in tests
after finding the matching test spec in this file.  If tests is empty,
run an htest for each spec dict in this file after finding the matching
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).
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
dialog, in which case the callable is the corresonding class.  Or the
Toplevel may contain the widget to be tested or set up a context in
which a test widget is invoked.  In this latter case, the callable is a
wrapper function that sets up the Toplevel and other objects.  Wrapper
function names, such as _editor_window', should start with '_'.


End the module with

if __name__ == '__main__':
    <unittest, if there is one>
    from idlelib.idle_test.htest import run
    run(X)

To have wrapper functions and test invocation code ignored by coveragepy
reports, put '# htest #' on the def statement header line.

def _wrapper(parent):  # htest #

Also make sure that the 'if __name__' line matches the above.  Then have
make sure that .coveragerc includes the following.

[report]
exclude_lines =
    .*# htest #
    if __name__ == .__main__.:

(The "." instead of "'" is intentional and necessary.)


To run any X, this file must contain a matching instance of the
following template, with X.__name__ prepended to '_spec'.
When all tests are run, the prefix is use to get X.

_spec = {
    'file': '',
    'kwds': {'title': ''},
    'msg': ""
    }

file (no .py): run() imports file.py.
kwds: augmented with {'parent':root} and passed to X as **kwds.
title: an example kwd; some widgets need this, delete if not.
msg: master window hints about testing the widget.


Modules and classes not being tested at the moment:
PyShell.PyShellEditorWindow
Debugger.Debugger
AutoCompleteWindow.AutoCompleteWindow
OutputWindow.OutputWindow (indirectly being tested with grep test)
    )import_module)_initializeTkVariantTestsNfileZaboutDialogkwdstitlezaboutDialog testZ_htestTmsgzaTest every button. Ensure Python, TK and IDLE versions are correctly displayed.
 [Close] to exit.ZCallTipWindowzHTyping '(' should display a calltip.
Typing ') should hide the calltip.
ZClassBrowserzInspect names of module, class(with superclass if applicable), methods and functions.
Toggle nested items.
Double clicking on items prints a traceback for an exception that is ignored.ZColorDelegatorzThe text is sample Python code.
Ensure components like comments, keywords, builtins,
string, definitions, and break are correctly colored.
The default color scheme is in idlelib/config-highlight.defZconfigDialogZConfigDialogTesta  IDLE preferences dialog.
In the 'Fonts/Tabs' tab, changing font face, should update the font face of the text in the area below it.
In the 'Highlighting' tab, try different color schemes. Clicking items in the sample program should update the choices above it.
In the 'Keys', 'General' and 'Extensions' tabs, test settingsof interest.
[Ok] to close the dialog.[Apply] to apply the settings and and [Cancel] to revert all changes.
Re-run the test to ensure changes made have persisted.ZdynOptionMenuWidgetzSelect one of the many options in the 'old option set'.
Click the button to change the option set.
Select one of the many options in the 'new option set'.ZEditorWindowz>Test editor functions of interest.
Best to close editor first.ZconfigSectionNameDialogzGet NamemessagezEnter somethingZ
used_namesabczAfter the text entered with [Ok] is stripped, <nothing>, 'abc', or more that 30 chars are errors.
Close 'Get Name' with a valid entry (printed to Shell), [Cancel], or [X]ZconfigHelpSourceEditzGet helpsourcea%  Enter menu item name and help file path
 <nothing> and more than 30 chars are invalid menu item names.
<nothing>, file does not exist are invalid path items.
Test for incomplete web address for help file path.
A valid entry will be printed to shell with [0k].
[Cancel] will print None to shellZkeybindingDialogzTest keybindingsactionz
find-againZcurrentKeySequences zTest for different key modifier sequences.
<nothing> is invalid.
No modifier key is invalid.
Shift key with [a-z],[0-9], function key, move key, tab, spaceis invalid.
No validity checking if advanced key binding entry is used.Z
GrepDialogzClick the 'Show GrepDialog' button.
Test the various 'Find-in-files' functions.
The results should be displayed in a new '*Output*' window.
'Right-click'->'Goto file/line' anywhere in the search results should open that file 
in a new EditorWindow.Z	IOBindinga  Test the following bindings.
<Control-o> to open file from dialog.
Edit the file.
<Control-p> to print the file.
<Control-s> to save the file.
<Alt-s> to save-as another file.
<Control-c> to save-copy-as another file.
Check that changes were saved by opening the file elsewhere.Z	MultiCalla  The following actions should trigger a print to console or IDLE Shell.
Entering and leaving the text area, key entry, <Control-Key>,
<Alt-Key-a>, <Control-Key-a>, <Alt-Control-Key-a>, 
<Control-Button-1>, <Alt-Button-1> and focusing out of the window
are sequences to be tested.ZMultiStatusBarzjEnsure presence of multi-status bar below text area.
Click 'Update Status' to change the multi-status textZObjectBrowserzDouble click on items upto the lowest level.
Attributes of the objects and related information will be displayed side-by-side at each level.ZPathBrowserzTest for correct display of all paths in sys.path.
Toggle nested items upto the lowest level.
Double clicking on an item prints a traceback
for an exception that is ignored.Z
Percolatora@  There are two tracers which can be toggled using a checkbox.
Toggling a tracer 'on' by checking it should print traceroutput to the console or to the IDLE shell.
If both the tracers are 'on', the output from the tracer which was switched 'on' later, should be printed first
Test for actions like text entry, and removal.ZReplaceDialogzClick the 'Replace' button.
Test various replace options in the 'Replace dialog'.
Click [Close] or [X] to close the 'Replace Dialog'.ZSearchDialogzClick the 'Search' button.
Test various search options in the 'Search dialog'.
Click [Close] or [X] to close the 'Search Dialog'.ZScrolledListzYou should see a scrollable list of items
Selecting (clicking) or double clicking an item prints the name to the console or Idle shell.
Right clicking an item will display a popup.helpzPIf the help text displays, this works.
Text is selectable. Window is scrollable.ZStackViewerzA stacktrace for a NameError exception.
Expand 'idlelib ...' and '<locals>'.
Check that exc_value, exc_tb, and exc_type are correct.
ZtabbedpageszToggle between the two tabs 'foo' and 'bar'
Add a tab by entering a suitable name for it.
Remove an existing tab by entering its name.
Remove all existing tabs.
<nothing> is an invalid add page and remove page name.
ZtextViewzTest textViewtextz-The quick brown fox jumps over the lazy dog.
#   zNTest for read-only property of text.
Text is selectable. Window is scrollable.ZToolTipzPPlace mouse cursor over both the buttons
A tooltip should appear with some text.Z
TreeWidgetzDThe canvas is scrollable.
Click on folders upto to the lowest level.ZUndoDelegatorzClick [Undo] to undo any action.
Click [Redo] to redo any action.
Click [Dump] to dump the current state by printing to the console or the IDLE shell.
ZWidgetRedirectorzEEvery text insert should be printed to the console.or the IDLE shell.c           	      s  t  j     j d   j d d  t   t  j  d d } | j   t  j | d d   j d  j	 d  d d	 d
 d d d  t  j
 | d  j }  j d | j  | j d d d d d d   j d d d d d d  g   |  rIx |  D]: } t   | j d } | j | d < j | | f  qWn x t   j   D]q \ } } | j d  rY| d  d&   | }  | d <t d | d  } t |   }  j | | f  qYWt  j d   d    d           f d d    }    f d! d"   }	 t  j  d#  d |	 }
 |
 j   t  j  d$ d% d |   j   |    j   d  S)'Nz
IDLE htestr   Zpadx
   ZwrapZwordZbgZreliefZflatZheight   widthF   ZcommandZyscrollcommandZsiderightZfillyexpandFleftZbothT_specname   zidlelib.r   r   c                 s   t    d k r  j    j   \ }    |  d    d < j d |  d   j d d   j d d	   j d |  d
   j d d  d  S)N   r   parentzTest r   stateZnormalz1.0endr   Zdisabled)lenZpack_forgetpopset	configureZdeleteinsert)	test_spec)callable_objectnext_buttonroot	test_kwds	test_list	test_namer    </opt/alt/python35/lib64/python3.5/idlelib/idle_test/htest.pynextt  s    


zrun.<locals>.nextc                 s6        }  y t  |  j  Wn t k
 r1 Yn Xd  S)N)printresultAttributeError)Zwidget)r$   r'   r*   r+   run_test  s
    zrun.<locals>.run_testZtextvariabler   ZNext)tkZTkr   Z	resizabler   ZFrameZpackZTextr!   ZcgetZ	ScrollbarZyviewconfigr    globals__name__appenditemsendswithr   getattrZ	StringVarZButtonZmainloop)ZtestsZ
frameLabelZ	scrollbarZtestr#   kdmodr,   r0   Zbuttonr*   )r$   r%   r&   r'   r(   r)   r   r+   runP  sJ    

+
$

r=   __main__)%__doc__	importlibr   Zidlelib.macosxSupportr   Ztkinterr2   ZAboutDialog_specZ_calltip_window_specZ_class_browser_specZ_color_delegator_specZConfigDialog_specZ_dyn_option_menu_specZ_editor_window_specZGetCfgSectionNameDialog_specZGetHelpSourceDialog_specZGetKeysDialog_specZ_grep_dialog_specZ_io_binding_specZ_multi_call_specZ_multistatus_bar_specZ_object_browser_specZ_path_browser_specZ_percolator_specZ_replace_dialog_specZ_search_dialog_specZ_scrolled_list_specZshow_idlehelp_specZ_stack_viewer_specZ_tabbed_pages_specZTextViewer_specZ_tooltip_specZ_tree_widget_specZ_undo_delegator_specZ_widget_redirector_specr=   r5   r*   r*   r*   r+   <module>B   s   									
						
	C