lib64
/
python2.7
/
idlelib
/
idle_test
/
Go to Home Directory
+
Upload
Create File
root@0UT1S:~$
Execute
By Order of Mr.0UT1S
[DIR] ..
N/A
README.txt
5.36 KB
Rename
Delete
__init__.py
650 bytes
Rename
Delete
__init__.pyc
915 bytes
Rename
Delete
__init__.pyo
915 bytes
Rename
Delete
htest.py
13.46 KB
Rename
Delete
htest.pyc
12.30 KB
Rename
Delete
htest.pyo
12.30 KB
Rename
Delete
mock_idle.py
1.56 KB
Rename
Delete
mock_idle.pyc
2.81 KB
Rename
Delete
mock_idle.pyo
2.81 KB
Rename
Delete
mock_tk.py
11.30 KB
Rename
Delete
mock_tk.pyc
12.07 KB
Rename
Delete
mock_tk.pyo
12.07 KB
Rename
Delete
test_autocomplete.py
4.81 KB
Rename
Delete
test_autocomplete.pyc
5.72 KB
Rename
Delete
test_autocomplete.pyo
5.72 KB
Rename
Delete
test_autoexpand.py
4.03 KB
Rename
Delete
test_autoexpand.pyc
4.69 KB
Rename
Delete
test_autoexpand.pyo
4.69 KB
Rename
Delete
test_calltips.py
6.97 KB
Rename
Delete
test_calltips.pyc
11.85 KB
Rename
Delete
test_calltips.pyo
11.85 KB
Rename
Delete
test_config_name.py
2.41 KB
Rename
Delete
test_config_name.pyc
3.92 KB
Rename
Delete
test_config_name.pyo
3.92 KB
Rename
Delete
test_configdialog.py
782 bytes
Rename
Delete
test_configdialog.pyc
1.62 KB
Rename
Delete
test_configdialog.pyo
1.62 KB
Rename
Delete
test_delegator.py
1.26 KB
Rename
Delete
test_delegator.pyc
1.29 KB
Rename
Delete
test_delegator.pyo
1.29 KB
Rename
Delete
test_editmenu.py
3.09 KB
Rename
Delete
test_editmenu.pyc
4.33 KB
Rename
Delete
test_editmenu.pyo
4.33 KB
Rename
Delete
test_formatparagraph.py
14.01 KB
Rename
Delete
test_formatparagraph.pyc
13.98 KB
Rename
Delete
test_formatparagraph.pyo
13.98 KB
Rename
Delete
test_grep.py
2.70 KB
Rename
Delete
test_grep.pyc
3.67 KB
Rename
Delete
test_grep.pyo
3.67 KB
Rename
Delete
test_helpabout.py
1.57 KB
Rename
Delete
test_helpabout.pyc
2.31 KB
Rename
Delete
test_helpabout.pyo
2.31 KB
Rename
Delete
test_hyperparser.py
5.55 KB
Rename
Delete
test_hyperparser.pyc
6.58 KB
Rename
Delete
test_hyperparser.pyo
6.58 KB
Rename
Delete
test_idlehistory.py
5.37 KB
Rename
Delete
test_idlehistory.pyc
7.95 KB
Rename
Delete
test_idlehistory.pyo
7.95 KB
Rename
Delete
test_io.py
9.28 KB
Rename
Delete
test_io.pyc
11.26 KB
Rename
Delete
test_io.pyo
11.26 KB
Rename
Delete
test_parenmatch.py
3.73 KB
Rename
Delete
test_parenmatch.pyc
5.33 KB
Rename
Delete
test_parenmatch.pyo
5.33 KB
Rename
Delete
test_pathbrowser.py
940 bytes
Rename
Delete
test_pathbrowser.pyc
1.45 KB
Rename
Delete
test_pathbrowser.pyo
1.45 KB
Rename
Delete
test_rstrip.py
1.58 KB
Rename
Delete
test_rstrip.pyc
1.73 KB
Rename
Delete
test_rstrip.pyo
1.73 KB
Rename
Delete
test_searchdialogbase.py
5.73 KB
Rename
Delete
test_searchdialogbase.pyc
6.67 KB
Rename
Delete
test_searchdialogbase.pyo
6.67 KB
Rename
Delete
test_searchengine.py
11.22 KB
Rename
Delete
test_searchengine.pyc
12.35 KB
Rename
Delete
test_searchengine.pyo
12.35 KB
Rename
Delete
test_text.py
6.59 KB
Rename
Delete
test_text.pyc
7.96 KB
Rename
Delete
test_text.pyo
7.96 KB
Rename
Delete
test_textview.py
2.74 KB
Rename
Delete
test_textview.pyc
4.42 KB
Rename
Delete
test_textview.pyo
4.42 KB
Rename
Delete
test_warning.py
2.69 KB
Rename
Delete
test_warning.pyc
3.21 KB
Rename
Delete
test_warning.pyo
3.21 KB
Rename
Delete
test_widgetredir.py
4.08 KB
Rename
Delete
test_widgetredir.pyc
6.23 KB
Rename
Delete
test_widgetredir.pyo
6.23 KB
Rename
Delete
� {fc @ s� d Z d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d d l m Z d e f d � � YZ d 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. t Eventc B s e Z d Z d � Z RS( 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. c K s | j j | � d S( s, Create event with attributes needed for testN( t __dict__t update( t selft kwds( ( 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.pyR s t Varc B s2 e Z d Z d d d d � Z d � Z d � Z RS( s) Use for String/Int/BooleanVar: incompletec C s | | _ | | _ | | _ d S( N( t mastert valuet name( R R R R ( ( s1 /usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyR s c C s | | _ d S( N( R ( R R ( ( s1 /usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyt set s c C s | j S( N( R ( R ( ( s1 /usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyt get! s N( R R R t NoneR R R ( ( ( s1 /usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyR s t Mbox_funcc B s# e Z d Z d d � Z d � Z RS( s Generic 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 c C s | | _ d S( N( t result( R R ( ( s1 /usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyR + s c O s+ | | _ | | _ | | _ | | _ | j S( N( t titlet messaget argsR R ( R R R R R ( ( s1 /usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyt __call__- s N( R R R R R R ( ( ( s1 /usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyR $ s t Mboxc B sV e Z d Z e � Z e � Z e � Z e � Z e � Z e � Z e � Z e � Z RS( s5 Mock 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, ( R R R R t askokcancelt askquestiont askretrycancelt askyesnot askyesnocancelt showerrort showinfot showwarning( ( ( s1 /usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyR 5 s i����( t TclErrort Textc B s� e Z d Z d i d � Z d � Z d d � Z d � Z d � Z d d � Z d d � Z d � Z d � Z d � Z d d � Z d � Z d � Z d � Z d d d d � Z RS( 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. c K s d d g | _ d S( 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. t s N( t data( R R t cnft kw( ( s1 /usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyR g s c C s d | j | d d �S( sA Return string version of index decoded according to current text.s %s.%st endflagi ( t _decode( R t index( ( s1 /usr/lib64/python2.7/idlelib/idle_test/mock_tk.pyR'