OwlCyberSecurity - MANAGER
Edit File: test_idlehistory.cpython-35.pyc
��Yfu������������������@���s����d��d�l��Z��d��d�l�m�Z�d��d�l�Z�d��d�l�m�Z�d��d�l�m�Z�d��d�l �m �Z �d��d�l�m�Z�d�Z �d�Z�Gd�d ����d �e��j���Z�Gd �d����d���Z�Gd�d ����d �e��j���Z�e�d�k�r��e��j�d�d�d�d���d�S)�����N)�requires)�Text)�History)�idleConfza = 7zb = ac���������������@���sd���e��Z�d��Z�d�Z�e�d�d������Z�d�d����Z�d�d����Z�d�d ����Z�d �d����Z �d�d ����Z �d�S)� StoreTestz7Tests History.__init__ and History.store with mock Textc�������������C���s"���t�����|��_�t�|��j���|��_�d��S)N)�mkText�textr����history)�cls��r����G/opt/alt/python35/lib64/python3.5/idlelib/idle_test/test_idlehistory.py� setUpClass���s����zStoreTest.setUpClassc�������������C���s#���|��j��j�d�d���g��|��j�_�d��S)Nz1.0�end)r����deleter ���)�selfr���r���r����tearDown���s����zStoreTest.tearDownc�������������C���s����|��j��|��j�j�|��j���|��j�|��j�j�g����|��j�|��j�j���|��j�|��j�j���|��j�|��j�j�t�j �d�d�d�d�d�����d��S)N�mainr����cyclic�����bool) ZassertIsr ���r����assertEqual�assertIsNone�prefix�pointerr���r���Z GetOption)r���r���r���r���� test_init���s����zStoreTest.test_initc�������������C���sP���|��j��j�d���|��j�|��j��j��g����|��j��j�d���|��j�|��j��j��g����d��S)N�az a )r ����storer���)r���r���r���r����test_store_short!���s����zStoreTest.test_store_shortc�������������C���s����|��j��j�t���|��j�|��j��j��t�g���|��j��j�t���|��j�|��j��j��t�t�g���|��j��j�t���|��j�|��j��j��t�t�g���d��S)N)r ���r����line1r����line2)r���r���r���r����test_store_dup'���s����zStoreTest.test_store_dupc�������������C���sR���t��|��j�_�d�|��j�_�|��j�j�t���|��j�|��j�j���|��j�|��j�j���d��S)Nr���)r���r ���r���r���r���r���r���)r���r���r���r����test_store_reset/���s ����zStoreTest.test_store_resetN)�__name__� __module__�__qualname__�__doc__�classmethodr ���r���r���r���r ���r!���r���r���r���r���r��� ���s���r���c���������������@���s4���e��Z�d��Z�d�d����Z�d�d����Z�d�d����Z�d�S)�TextWrapperc�������������C���s���t��d�|���|��_�d�|��_�d��S)N�masterF)�tkTextr����_bell)r���r(���r���r���r����__init__8���s����zTextWrapper.__init__c�������������C���s���t��|��j�|���S)N)�getattrr���)r����namer���r���r����__getattr__;���s����zTextWrapper.__getattr__c�������������C���s ���d�|��_��d��S)NT)r*���)r���r���r���r����bell=���s����zTextWrapper.bellN)r"���r#���r$���r+���r.���r/���r���r���r���r���r'���7���s���r'���c���������������@���s����e��Z�d��Z�d�Z�e�d�d������Z�d�d����Z�e�d�d������Z�d�d �d �d���Z�d�d ����Z �d�d����Z �d�d����Z�d�d����Z�d�d����Z �d�d����Z�d�d����Z�d�d����Z�d�d����Z�d�S)� FetchTestz-Test History.fetch with wrapped tk.Text. c�������������C���s*���t��d���t�j����|��_�|��j�j����d��S)NZgui)r����tkZTk�rootZwithdraw)r ���r���r���r���r ���C���s���� zFetchTest.setUpClassc�������������C���sk���t��|��j���|��_�}�|�j�d�d���|�j�d�d���|�j�d�d���t�|���|��_�t�t �g�|��j�_�d��S)Nz1.0z>>> �iomarkz1.4�left) r'���r2���r����insert�mark_setZmark_gravityr���r ���r���r���)r���r���r���r���r����setUpI���s����zFetchTest.setUpc�������������C���s���|��j��j����|��`��d��S)N)r2���Zdestroy)r ���r���r���r���� tearDownClassQ���s���� zFetchTest.tearDownClassr/���Fc������������C���s����|��j��}�|�j�|���|��j�}�|�|��j�j�d�d���|���|�|��j�j�|���|�r`�d�|��j�_�|�|�j�|���|�|�j�|���|�|��j�j�d�d�d���d���d��S)Nr3���zend-1cFr5���z==r���) r ����fetchr���r����getr*���r���r���Zcompare)r����reverse�liner����indexr/���r���ZEqualr���r���r���� fetch_testV���s���� zFetchTest.fetch_testc�������������C���sR���d�}�|��j��}�|�d�t�|�d���|�d�t�|�d���|�d�|�d��d��d�d��d��S)N��Tr���r���r/���)r>���r���r���)r���r����testr���r���r����test_fetch_prev_cyclicf���s ���� z FetchTest.test_fetch_prev_cyclicc�������������C���sR���d�}�|��j��}�|�d�t�|�d���|�d�t�|�d���|�d�|�d��d��d�d��d��S)Nr?���Fr���r���r/���T)r>���r���r���)r���r���r@���r���r���r����test_fetch_next_cyclicm���s ���� z FetchTest.test_fetch_next_cyclicc�������������C���sO���d�}�|��j��j�d�|���|��j�d�t�|�d���|��j�d�|�d��d��d�d��d��S)Nr���r3���Tr���r/���)r���r5���r>���r���)r���r���r���r���r����test_fetch_prev_prefixu���s����z FetchTest.test_fetch_prev_prefixc�������������C���sO���d�}�|��j��j�d�|���|��j�d�t�|�d���|��j�d�|�d��d��d�d��d��S)Nr���r3���Fr���r/���T)r���r5���r>���r���)r���r���r���r���r����test_fetch_next_prefix{���s����z FetchTest.test_fetch_next_prefixc�������������C���s^���d�}�d�|��j��_�|��j�}�|�d�t�|�d���|�d�t�|�d���|�d�t�|�d�d�d��d��S)Nr?���FTr���r���r/���)r ���r���r>���r���r���)r���r���r@���r���r���r����test_fetch_prev_noncyclic����s���� z#FetchTest.test_fetch_prev_noncyclicc�������������C���s}���d�}�d�|��j��_�|��j�}�|�d�|�d��d��d�d��|�d�t�|�d���|�d�|�d��d��d�d��|�d�|�d��d��d�d��d��S)Nr?���Fr/���Tr���)r ���r���r>���r���)r���r���r@���r���r���r����test_fetch_next_noncyclic����s���� z#FetchTest.test_fetch_next_noncyclicc�������������C���sF���|��j��j�d�d���|��j�j�d�d���|��j�d�t�d��d��d�d��d��S)Nr;���Tr5���r3���r/���)r ���r9���r���r6���r>���r���)r���r���r���r����test_fetch_cursor_move����s����z FetchTest.test_fetch_cursor_movec�������������C���sS���|��j��j�d�d���|��j�j�d�d���|��j�j�d�d���|��j�d�t�d�d���d��S)Nr;���Tr3���r5���za =r���)r ���r9���r���r���r5���r>���r���)r���r���r���r����test_fetch_edit����s����zFetchTest.test_fetch_editc�������������C���sP���|��j��j�d���|��j�|��j��j�d���|��j��j�d���|��j�|��j��j�d����d��S)Nzdummy eventr���)r ���Zhistory_prevr���r���Zhistory_next)r���r���r���r����test_history_prev_next����s����z FetchTest.test_history_prev_nextN)r"���r#���r$���r%���r&���r ���r7���r8���r>���rA���rB���rC���rD���rE���rF���rG���rH���rI���r���r���r���r���r0���@���s��� r0����__main__� verbosity�����exit)ZunittestZtest.supportr���Ztkinterr1���r���r)���Zidlelib.idle_test.mock_tkr���Zidlelib.IdleHistoryr���Zidlelib.configHandlerr���r���r���ZTestCaser���r'���r0���r"���r���r���r���r���r����<module>���s���* g