404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.216.207.209: ~ $
�
{fc@s�dZdefd��YZdefd��YZdefd��YZdefd��YZd	d
lmZdefd��YZd
S(s�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.
tEventcBseZdZd�ZRS(s�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(s,Create event with attributes needed for testN(t__dict__tupdate(tselftkwds((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyt__init__s(t__name__t
__module__t__doc__R(((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyRs
tVarcBs2eZdZdddd�Zd�Zd�ZRS(s)Use for String/Int/BooleanVar: incompletecCs||_||_||_dS(N(tmastertvaluetname(RR
RR((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyRs		cCs
||_dS(N(R(RR((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pytsetscCs|jS(N(R(R((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pytget!sN(RRRtNoneRR
R(((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyR	s	t	Mbox_funccBs#eZdZdd�Zd�ZRS(sGeneric 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
    cCs
||_dS(N(tresult(RR((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyR+scOs+||_||_||_||_|jS(N(ttitletmessagetargsRR(RRRRR((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyt__call__-s
				N(RRRRRR(((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyR$stMboxcBsVeZdZe�Ze�Ze�Ze�Ze�Ze�Z	e�Z
e�ZRS(s5Mock 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,
    (RRRRtaskokcanceltaskquestiontaskretrycanceltaskyesnotaskyesnocancelt	showerrortshowinfotshowwarning(((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyR5s							i����(tTclErrortTextcBs�eZdZdid�Zd�Zdd�Zd�Zd�Zdd�Z	dd�Z
d	�Zd
�Zd�Z
dd�Zd
�Zd�Zd�Zdddd�ZRS(s�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.
   cKsddg|_dS(s�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.
        ts
N(tdata(RR
tcnftkw((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyRgscCsd|j|dd�S(sAReturn string version of index decoded according to current text.s%s.%stendflagi(t_decode(Rtindex((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyR'osicCsqt|ttf�r$t|�}ny|j�}Wn!tk
rWtd|��nXt|j�d}|dkr�|t|j|�dfS|dkr�|j	|�S|j
d�\}}t|�}|dkr�dS||kr�|j	|�St|j|�d}|jd�s'|dkr1||fSt|�}|dkrRd}n||krg|}n||fS(	s7Return a (line, char) tuple of int indexes into self.data.

        This implements .index without converting the result back to a string.
        The result is contrained 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.
        sbad text index "%s"itinserttendt.is lineend(ii(
t
isinstancetfloattbyteststrtlowertAttributeErrorRtlenR"t_endextsplittinttendswith(RR'R%tlastlinetlinetchart
linelength((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyR&ss4



		cCsNt|j�}|dkr%|dfS|d8}|t|j|�|fSdS(sReturn 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)
       iiN(R1R"(RR%tn((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyR2�s


cCs�|s
dS|jt�}|dddkr=|jd�n|j|d�\}}|j|| }|j||}||d|j|<|d|j|d|d+|j|t|�dc|7<dS(s+Insert chars before the character at index.Ni����s
R!ii(t
splitlinestTruetappendR&R"R1(RR'tcharsR7R8tbeforetafter((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyR(�sc	Cs�|j|�\}}|dkr5||d}}n|j|�\}}||krh|j|||!S|j||g}x/t|d|�D]}|j|j|�q�W|j|j|| �dj|�SdS(s;Return slice from index1 to index2 (default is 'index1+1').iR!N(R&RR"trangeR=tjoin(	Rtindex1tindex2t	startlinet	startchartendlinetendchartlinesti((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyR�scCsO|j|d�\}}|dkr�|t|j|�dkrU||d}}q�|t|j�dkr�|dd}}q�dSn|j|d�\}}||kr�||kr�|j|| |j|||j|<nh||krK|j|| |j|||j|<|d7}x(t||d�D]}|j|=q4WndS(s�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]).
        i����iiN(R&RR1R"RA(RRCRDRERFRGRHRJ((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pytdelete�s"
cCs:|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(Nt<s<=t>s>=s==s!=s=bad comparison operator "%s": must be <, <=, ==, >=, >, or !=(R&R(RRCtopRDtline1tchar1tline2tchar2((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pytcompare�s """"cCsdS(s.Set mark *name* before the character at index.N((RRR'((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pytmark_set
scGsdS(sDelete all marks in markNames.N((Rt	markNames((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyt
mark_unsetR!cCsdS(sARemove tag tagName from all characters between index1 and index2.N((RttagNameRCRD((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyt
tag_removescCsdS(s2Adjust the view of the text according to scan_markN((Rtxty((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pytscan_dragtoR!cCsdS(s&Remember the current X, Y coordinates.N((RRYRZ((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyt	scan_markR!cCsdS(s8Scroll screen to make the character at INDEX is visible.N((RR'((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pytsee!scCsdS(s>Bind to this widget at event sequence a call to function func.N((tsequencetfunctadd((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pytbind(sN(RRRRRR'R&R2R(RRKRSRTRVRXR[R\R]Ra(((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyR Zs 	3								N(	RtobjectRR	RRt_tkinterRR (((s1/usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyt<module>s#

Filemanager

Name Type Size Permission Actions
README.txt File 5.36 KB 0644
__init__.py File 650 B 0644
__init__.pyc File 915 B 0644
__init__.pyo File 915 B 0644
htest.py File 13.46 KB 0644
htest.pyc File 12.3 KB 0644
htest.pyo File 12.3 KB 0644
mock_idle.py File 1.56 KB 0644
mock_idle.pyc File 2.81 KB 0644
mock_idle.pyo File 2.81 KB 0644
mock_tk.py File 11.3 KB 0644
mock_tk.pyc File 12.07 KB 0644
mock_tk.pyo File 12.07 KB 0644
test_autocomplete.py File 4.81 KB 0644
test_autocomplete.pyc File 5.72 KB 0644
test_autocomplete.pyo File 5.72 KB 0644
test_autoexpand.py File 4.03 KB 0644
test_autoexpand.pyc File 4.69 KB 0644
test_autoexpand.pyo File 4.69 KB 0644
test_calltips.py File 6.97 KB 0644
test_calltips.pyc File 11.85 KB 0644
test_calltips.pyo File 11.85 KB 0644
test_config_name.py File 2.41 KB 0644
test_config_name.pyc File 3.92 KB 0644
test_config_name.pyo File 3.92 KB 0644
test_configdialog.py File 782 B 0644
test_configdialog.pyc File 1.62 KB 0644
test_configdialog.pyo File 1.62 KB 0644
test_delegator.py File 1.26 KB 0644
test_delegator.pyc File 1.29 KB 0644
test_delegator.pyo File 1.29 KB 0644
test_editmenu.py File 3.09 KB 0644
test_editmenu.pyc File 4.33 KB 0644
test_editmenu.pyo File 4.33 KB 0644
test_formatparagraph.py File 14.01 KB 0644
test_formatparagraph.pyc File 13.98 KB 0644
test_formatparagraph.pyo File 13.98 KB 0644
test_grep.py File 2.7 KB 0644
test_grep.pyc File 3.67 KB 0644
test_grep.pyo File 3.67 KB 0644
test_helpabout.py File 1.57 KB 0644
test_helpabout.pyc File 2.31 KB 0644
test_helpabout.pyo File 2.31 KB 0644
test_hyperparser.py File 5.55 KB 0644
test_hyperparser.pyc File 6.58 KB 0644
test_hyperparser.pyo File 6.58 KB 0644
test_idlehistory.py File 5.37 KB 0644
test_idlehistory.pyc File 7.95 KB 0644
test_idlehistory.pyo File 7.95 KB 0644
test_io.py File 9.28 KB 0644
test_io.pyc File 11.26 KB 0644
test_io.pyo File 11.26 KB 0644
test_parenmatch.py File 3.73 KB 0644
test_parenmatch.pyc File 5.33 KB 0644
test_parenmatch.pyo File 5.33 KB 0644
test_pathbrowser.py File 940 B 0644
test_pathbrowser.pyc File 1.45 KB 0644
test_pathbrowser.pyo File 1.45 KB 0644
test_rstrip.py File 1.58 KB 0644
test_rstrip.pyc File 1.73 KB 0644
test_rstrip.pyo File 1.73 KB 0644
test_searchdialogbase.py File 5.73 KB 0644
test_searchdialogbase.pyc File 6.67 KB 0644
test_searchdialogbase.pyo File 6.67 KB 0644
test_searchengine.py File 11.22 KB 0644
test_searchengine.pyc File 12.35 KB 0644
test_searchengine.pyo File 12.35 KB 0644
test_text.py File 6.59 KB 0644
test_text.pyc File 7.96 KB 0644
test_text.pyo File 7.96 KB 0644
test_textview.py File 2.74 KB 0644
test_textview.pyc File 4.42 KB 0644
test_textview.pyo File 4.42 KB 0644
test_warning.py File 2.69 KB 0644
test_warning.pyc File 3.21 KB 0644
test_warning.pyo File 3.21 KB 0644
test_widgetredir.py File 4.08 KB 0644
test_widgetredir.pyc File 6.23 KB 0644
test_widgetredir.pyo File 6.23 KB 0644