$30 GRAYBYTE WORDPRESS FILE MANAGER $46

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/python35/lib64/python3.5/idlelib/idle_test/__pycache__/

HOME
Current File : /opt/alt/python35/lib64/python3.5/idlelib/idle_test/__pycache__//mock_tk.cpython-35.pyc


��Yfj-�@s�dZGdd�d�ZGdd�d�ZGdd�d�ZGdd�d�Zd	d
lmZGdd�d�ZGd
d�d�ZdS)z�Classes that replace tkinter gui objects used by an object being tested.

A gui object is anything with a master or parent parameter, which is
typically required in spite of what the doc strings say.
c@s"eZdZdZdd�ZdS)�Eventa�Minimal mock with attributes for testing event handlers.

    This is not a gui object, but is used as an argument for callbacks
    that access attributes of the event passed. If a callback ignores
    the event, other than the fact that is happened, pass 'event'.

    Keyboard, mouse, window, and other sources generate Event instances.
    Event instances have the following attributes: serial (number of
    event), time (of event), type (of event as number), widget (in which
    event occurred), and x,y (position of mouse). There are other
    attributes for specific events, such as keycode for key events.
    tkinter.Event.__doc__ has more but is still not complete.
    cKs|jj|�dS)z,Create event with attributes needed for testN)�__dict__�update)�self�kwds�r�>/opt/alt/python35/lib64/python3.5/idlelib/idle_test/mock_tk.py�__init__szEvent.__init__N)�__name__�
__module__�__qualname__�__doc__rrrrrrs
rc@sCeZdZdZddddd�Zdd�Zdd�ZdS)	�Varz)Use for String/Int/BooleanVar: incompleteNcCs||_||_||_dS)N)�master�value�name)rrrrrrrrs		zVar.__init__cCs
||_dS)N)r)rrrrr�setszVar.setcCs|jS)N)r)rrrr�get!szVar.get)r	r
rrrrrrrrrr
sr
c@s1eZdZdZddd�Zdd�ZdS)�	Mbox_funcaGeneric mock for messagebox functions, which all have the same signature.

    Instead of displaying a message box, the mock's call method saves the
    arguments as instance attributes, which test functions can then examime.
    The test can set the result returned to ask function
    NcCs
||_dS)N)�result)rrrrrr+szMbox_func.__init__cOs+||_||_||_||_|jS)N)�title�message�argsrr)rrrrrrrr�__call__-s
				zMbox_func.__call__)r	r
rrrrrrrrr$src@s^eZdZdZe�Ze�Ze�Ze�Ze�Z	e�Z
e�Ze�ZdS)�Mboxa5Mock for tkinter.messagebox with an Mbox_func for each function.

    This module was 'tkMessageBox' in 2.x; hence the 'import as' in  3.x.
    Example usage in test_module.py for testing functions in module.py:
    ---
from idlelib.idle_test.mock_tk import Mbox
import module

orig_mbox = module.tkMessageBox
showerror = Mbox.showerror  # example, for attribute access in test methods

class Test(unittest.TestCase):

    @classmethod
    def setUpClass(cls):
        module.tkMessageBox = Mbox

    @classmethod
    def tearDownClass(cls):
        module.tkMessageBox = orig_mbox
    ---
    For 'ask' functions, set func.result return value before calling the method
    that uses the message function. When tkMessageBox functions are the
    only gui alls in a method, this replacement makes the method gui-free,
    N)
r	r
rrrZaskokcancelZaskquestionZaskretrycancelZaskyesnoZaskyesnocancelZ	showerrorZshowinfo�showwarningrrrrr5s							r�)�TclErrorc@s�eZdZdZdidd�Zdd�Zddd	�Zd
d�Zdd
�Zddd�Z	ddd�Z
dd�Zdd�Zdd�Z
ddd�Zdd�Zdd�Zdd�Zdddd d!�ZdS)"�Texta�A semi-functional non-gui replacement for tkinter.Text text editors.

    The mock's data model is that a text is a list of 
-terminated lines.
    The mock adds an empty string at  the beginning of the list so that the
    index of actual lines start at 1, as with Tk. The methods never see this.
    Tk initializes files with a terminal 
 that cannot be deleted. It is
    invisible in the sense that one cannot move the cursor beyond it.

    This class is only tested (and valid) with strings of ascii chars.
    For testing, we are not concerned with Tk Text's treatment of,
    for instance, 0-width characters or character + accent.
   NcKsddg|_dS)z�Initialize mock, non-gui, text-only Text widget.

        At present, all args are ignored. Almost all affect visual behavior.
        There are just a few Text-only options that affect text behavior.
        ��
N)�data)rrZcnf�kwrrrrgsz
Text.__init__cCsd|j|dd�S)zAReturn string version of index decoded according to current text.z%s.%s�endflag�)�_decode)r�indexrrrr%osz
Text.indexrcCsot|ttf�r!t|�}y|j�}Wn%tk
rXtd|�d�YnXt|j�d}|dkr�|t|j|�dfS|dkr�|j	|�S|j
d�\}}t|�}|dkr�d	S||kr�|j	|�St|j|�d}|jd�s(|dkr2||fSt|�}|dkrSd}n||kre|}||fS)
a8Return a (line, char) tuple of int indexes into self.data.

        This implements .index without converting the result back to a string.
        The result is constrained by the number of lines and linelengths of
        self.data. For many indexes, the result is initially (1, 0).

        The input index may have any of several possible forms:
        * line.char float: converted to 'line.char' string;
        * 'line.char' string, where line and char are decimal integers;
        * 'line.char lineend', where lineend='lineend' (and char is ignored);
        * 'line.end', where end='end' (same as above);
        * 'insert', the positions before terminal 
;
        * 'end', whose meaning depends on the endflag passed to ._endex.
        * 'sel.first' or 'sel.last', where sel is a tag -- not implemented.
        zbad text index "%s"Nr#�insert�end�.rz lineend)r#r)
�
isinstance�float�bytes�str�lower�AttributeErrorr�lenr �_endex�split�int�endswith)rr%r"Zlastline�line�charZ
linelengthrrrr$ss4



	zText._decodecCsNt|j�}|dkr%|dfS|d8}|t|j|�|fSdS)aReturn position for 'end' or line overflow corresponding to endflag.

       -1: position before terminal 
; for .insert(), .delete
       0: position after terminal 
; for .get, .delete index 1
       1: same viewed as beginning of non-existent next line (for .index)
       r#rN)r/r )rr"�nrrrr0�s


zText._endexcCs�|s
dS|jd�}|dddkr:|jd�|j|d	�\}}|j|d|�}|j||d�}||d|j|<|dd�|j|d|d�<|j|t|�d|7<dS)
z+Insert chars before the character at index.NTr#rrr���r7r7)�
splitlines�appendr$r r/)rr%�charsr4r5Zbefore�afterrrrr&�s
%zText.insertc	Cs�|j|�\}}|dkr5||d}}n|j|�\}}||krk|j|||�S|j||d�g}x/t|d|�D]}|j|j|�q�W|j|j|d|��dj|�SdS)z;Return slice from index1 to index2 (default is 'index1+1').Nr#r)r$r �ranger9�join)	r�index1�index2�	startline�	startchar�endline�endchar�lines�irrrr�szText.getcCsd|j|d�\}}|dkr�|t|j|�dkrU||d}}q�|t|j�dkr�|dd}}q�dSn|j|d�\}}||kr�||kr�|j|d|�|j||d�|j|<nq||kr`|j|d|�|j||d�|j|<|d7}x%t||d�D]}|j|=qLWdS)z�Delete slice from index1 to index2 (default is 'index1+1').

        Adjust default index2 ('index+1) for line ends.
        Do not delete the terminal 
 at the very end of self.data ([-1][-1]).
        r#Nrr7r7)r$r/r r<)rr>r?r@rArBrCrErrr�delete�s""
zText.deletecCs:|j|�\}}|j|�\}}|dkrX||kpW||koW||kS|dkr�||kp�||ko�||kS|dkr�||kp�||ko�||kS|dkr�||kp�||ko�||kS|dkr||ko||kS|dkr&||kp%||kStd|��dS)N�<z<=�>z>=z==z!=z<bad comparison operator "%s":must be <, <=, ==, >=, >, or !=)r$r)rr>�opr?Zline1Zchar1Zline2Zchar2rrr�compare�s """"zText.comparecCsdS)z.Set mark *name* before the character at index.Nr)rrr%rrr�mark_set
sz
Text.mark_setcGsdS)zDelete all marks in markNames.Nr)rZ	markNamesrrr�
mark_unsetszText.mark_unsetcCsdS)zARemove tag tagName from all characters between index1 and index2.Nr)rZtagNamer>r?rrr�
tag_removeszText.tag_removecCsdS)z2Adjust the view of the text according to scan_markNr)r�x�yrrr�scan_dragtoszText.scan_dragtocCsdS)z&Remember the current X, Y coordinates.Nr)rrNrOrrr�	scan_markszText.scan_markcCsdS)z8Scroll screen to make the character at INDEX is visible.Nr)rr%rrr�see!szText.seecCsdS)z>Bind to this widget at event sequence a call to function func.Nr)Zsequence�func�addrrr�bind(sz	Text.bind)r	r
rrrr%r$r0r&rrFrJrKrLrMrPrQrRrUrrrrrZs 3rc@s"eZdZdZdd�ZdS)�EntryzMock for tkinter.Entry.cCsdS)Nr)rrrr�	focus_set.szEntry.focus_setN)r	r
rrrWrrrrrV,srVN)	rrr
rrZ_tkinterrrrVrrrr�<module>s#�


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
12 Aug 2024 8.41 AM
root / linksafe
0755
__init__.cpython-35.opt-1.pyc
0.804 KB
31 May 2024 1.51 PM
root / linksafe
0644
__init__.cpython-35.opt-2.pyc
0.484 KB
31 May 2024 1.51 PM
root / linksafe
0644
__init__.cpython-35.pyc
0.804 KB
31 May 2024 1.51 PM
root / linksafe
0644
htest.cpython-35.opt-1.pyc
11.44 KB
31 May 2024 1.51 PM
root / linksafe
0644
htest.cpython-35.opt-2.pyc
9.166 KB
31 May 2024 1.51 PM
root / linksafe
0644
htest.cpython-35.pyc
11.44 KB
31 May 2024 1.51 PM
root / linksafe
0644
mock_idle.cpython-35.opt-1.pyc
2.399 KB
31 May 2024 1.51 PM
root / linksafe
0644
mock_idle.cpython-35.opt-2.pyc
1.709 KB
31 May 2024 1.51 PM
root / linksafe
0644
mock_idle.cpython-35.pyc
2.399 KB
31 May 2024 1.51 PM
root / linksafe
0644
mock_tk.cpython-35.opt-1.pyc
11.116 KB
31 May 2024 1.51 PM
root / linksafe
0644
mock_tk.cpython-35.opt-2.pyc
6.291 KB
31 May 2024 1.51 PM
root / linksafe
0644
mock_tk.cpython-35.pyc
11.116 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_autocomplete.cpython-35.opt-1.pyc
4.946 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_autocomplete.cpython-35.opt-2.pyc
4.929 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_autocomplete.cpython-35.pyc
4.946 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_autoexpand.cpython-35.opt-1.pyc
4.133 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_autoexpand.cpython-35.opt-2.pyc
4.064 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_autoexpand.cpython-35.pyc
4.133 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_calltips.cpython-35.opt-1.pyc
10.01 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_calltips.cpython-35.opt-2.pyc
9.879 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_calltips.cpython-35.pyc
10.088 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_config_help.cpython-35.opt-1.pyc
4.309 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_config_help.cpython-35.opt-2.pyc
4.231 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_config_help.cpython-35.pyc
4.309 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_config_name.cpython-35.opt-1.pyc
3.16 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_config_name.cpython-35.opt-2.pyc
3.079 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_config_name.cpython-35.pyc
3.16 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_configdialog.cpython-35.opt-1.pyc
1.435 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_configdialog.cpython-35.opt-2.pyc
1.273 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_configdialog.cpython-35.pyc
1.435 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_delegator.cpython-35.opt-1.pyc
1.104 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_delegator.cpython-35.opt-2.pyc
1.086 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_delegator.cpython-35.pyc
1.104 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_editmenu.cpython-35.opt-1.pyc
2.882 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_editmenu.cpython-35.opt-2.pyc
2.483 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_editmenu.cpython-35.pyc
2.882 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_editor.cpython-35.opt-1.pyc
1.188 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_editor.cpython-35.opt-2.pyc
1.171 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_editor.cpython-35.pyc
1.188 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_formatparagraph.cpython-35.opt-1.pyc
12.412 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_formatparagraph.cpython-35.opt-2.pyc
11.65 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_formatparagraph.cpython-35.pyc
12.412 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_grep.cpython-35.opt-1.pyc
3.075 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_grep.cpython-35.opt-2.pyc
2.542 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_grep.cpython-35.pyc
3.075 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_help_about.cpython-35.opt-1.pyc
1.957 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_help_about.cpython-35.opt-2.pyc
1.82 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_help_about.cpython-35.pyc
1.957 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_hyperparser.cpython-35.opt-1.pyc
7.996 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_hyperparser.cpython-35.opt-2.pyc
7.813 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_hyperparser.cpython-35.pyc
7.996 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_idlehistory.cpython-35.opt-1.pyc
6.716 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_idlehistory.cpython-35.opt-2.pyc
6.567 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_idlehistory.cpython-35.pyc
6.716 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_io.cpython-35.opt-1.pyc
8.765 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_io.cpython-35.opt-2.pyc
8.747 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_io.cpython-35.pyc
8.765 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_parenmatch.cpython-35.opt-1.pyc
4.064 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_parenmatch.cpython-35.opt-2.pyc
3.609 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_parenmatch.cpython-35.pyc
4.064 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_pathbrowser.cpython-35.opt-1.pyc
1.309 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_pathbrowser.cpython-35.opt-2.pyc
1.291 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_pathbrowser.cpython-35.pyc
1.309 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_percolator.cpython-35.opt-1.pyc
5.179 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_percolator.cpython-35.opt-2.pyc
5.128 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_percolator.cpython-35.pyc
5.179 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_replacedialog.cpython-35.opt-1.pyc
7.498 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_replacedialog.cpython-35.opt-2.pyc
7.429 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_replacedialog.cpython-35.pyc
7.498 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_rstrip.cpython-35.opt-1.pyc
1.553 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_rstrip.cpython-35.opt-2.pyc
1.535 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_rstrip.cpython-35.pyc
1.553 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_searchdialog.cpython-35.opt-1.pyc
2.419 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_searchdialog.cpython-35.opt-2.pyc
2.34 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_searchdialog.cpython-35.pyc
2.419 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_searchdialogbase.cpython-35.opt-1.pyc
5.785 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_searchdialogbase.cpython-35.opt-2.pyc
5.584 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_searchdialogbase.cpython-35.pyc
5.785 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_searchengine.cpython-35.opt-1.pyc
10.698 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_searchengine.cpython-35.opt-2.pyc
10.606 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_searchengine.cpython-35.pyc
10.698 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_text.cpython-35.opt-1.pyc
6.857 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_text.cpython-35.opt-2.pyc
6.84 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_text.cpython-35.pyc
6.857 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_textview.cpython-35.opt-1.pyc
3.86 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_textview.cpython-35.opt-2.pyc
3.529 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_textview.cpython-35.pyc
3.86 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_undodelegator.cpython-35.opt-1.pyc
4.571 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_undodelegator.cpython-35.opt-2.pyc
4.301 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_undodelegator.cpython-35.pyc
4.571 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_warning.cpython-35.opt-1.pyc
2.839 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_warning.cpython-35.opt-2.pyc
2.497 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_warning.cpython-35.pyc
2.839 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_widgetredir.cpython-35.opt-1.pyc
5.485 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_widgetredir.cpython-35.opt-2.pyc
5.404 KB
31 May 2024 1.51 PM
root / linksafe
0644
test_widgetredir.cpython-35.pyc
5.485 KB
31 May 2024 1.51 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF