+
     Bi                     n   R t ^ RIHt ^ RIt^ RIHt ^ RIHt ^ RIH	t	H
t
 ]P                  t ! R R]P                  4      t ! R R	]P                  4      tR
 t ! R R]P                  4      t ! R R]P                  4      t ! R R]P                  4      t]R8X  d   ]P*                  ! ^R7       R# R# )zTest editor, coverage 53%.)editorN)
namedtuple)requires)TkTextc                   F   a  ] tR t^t o ]R 4       t]R 4       tR tRtV t	R# )EditorWindowTestc                n    \        R 4       \        4       V n        V P                  P                  4        R# guiN)r   r   rootwithdrawclss   &4/usr/lib/python3.14/idlelib/idle_test/test_editor.py
setUpClassEditorWindowTest.setUpClass   s"    4    c                   V P                   P                  4        V P                   P                  P                  R R4       F  pV P                   P	                  V4       K   	  V P                   P                  4        V = R# afterinfoN)r   update_idletaskstkcallafter_canceldestroyr   ids   & r   tearDownClassEditorWindowTest.tearDownClass   sX    !!#((++""7F3BHH!!"% 4Hr   c                    \        V P                  R 7      pV P                  VP                  V P                  4       VP                  4        R# )r   N)Editorr   assertEqual_close)selfes   & r   	test_initEditorWindowTest.test_init   s1    		"+	
r    N)
__name__
__module____qualname____firstlineno__classmethodr   r   r(   __static_attributes____classdictcell____classdict__s   @r   r   r      s5      
   r   r   c                   2   a  ] tR t^"t o R tR tR tRtV tR# )GetLineIndentTestc                    R FV  pR FM  pV P                  W!R7      ;_uu_ 4        V P                  \        P                  ! W!R7      R4       RRR4       KO  	  KX  	  R#   + '       g   i     Kh  ; i)   )linetabwidthr9   N)r7               ) 
    rB   subTestr$   r   get_line_indent)r&   r9   r8   s   &  r   test_empty_lines"GetLineIndentTest.test_empty_lines#   sY    'H"\\t\??$$..tG @? # (???s   (A	A0c           
         RpV FP  w  r#V P                  VR7      ;_uu_ 4        V P                  \        P                  ! V^R7      V4       RRR4       KR  	  R#   + '       g   i     Kg  ; i)	no spacesr8   r:   N)rI   rA   )z    space test)r<   r<   )		tab test)r7   r<   )		double tabs test)r;   r>   )z    	mixed test   r>   )z  	  mixed test)rO   r=   )z	    mixed testrN   )  	mixed test)   r<   ) 	 mixed test)rQ   rO   )	  mixed test)rQ   r=   z
newline testrA   rC   r&   testsr8   expecteds   &   r   test_tabwidth_4!GetLineIndentTest.test_tabwidth_4,   [    -  $ND4((  **4!< )( $(((   )AA,c           
         RpV FP  w  r#V P                  VR7      ;_uu_ 4        V P                  \        P                  ! V^R7      V4       RRR4       KR  	  R#   + '       g   i     Kg  ; i)rI   rJ   r:   N)rK   )z        space test)r>   r>   )rL   )r7   r>   )rM   )r;      )z        	mixed test	   r]   )z      	  mixed test)r_   
   )z	        mixed testr^   )rP   )rQ   r>   )rR   )rQ   r_   )rS   )rQ   r`   rT   rC   rU   s   &   r   test_tabwidth_8!GetLineIndentTest.test_tabwidth_8E   rZ   r[   r*   N)	r+   r,   r-   r.   rF   rX   ra   r0   r1   r2   s   @r   r5   r5   "   s     2 r   r5   c                 n    V P                  R R4       V P                  RV4       V P                  4        R# )1.0endN)deleteinsertr   )textstrings   &&r   rg   rg   _   s*    KKuKKvr   c                   F   a  ] tR t^et o ]R 4       t]R 4       tR tRtV t	R# )IndentAndNewlineTestc                    \        R 4       \        4       V n        V P                  P                  4        \	        V P                  R7      V n        ^V P
                  n        ^V P
                  n        R# r   r"   N)r   r   r   r   r#   windowindentwidthr9   r   s   &r   r   IndentAndNewlineTest.setUpClassg   sJ    4*
!"



r   c                :   V P                   P                  4        V = V P                  P                  4        V P                  P                  P                  R R4       F  pV P                  P                  V4       K   	  V P                  P                  4        V =R# r   rn   r%   r   r   r   r   r   r   r   s   & r   r   "IndentAndNewlineTest.tearDownClassp   m    

J!!#((++""7F3BHH!!"% 4Hr   c                   V P                   pV P                  pVP                  pVP                  pVP                  p\        R . R(O4      pV! RRRR4      V! RRRR4      V! R	RRR
4      V! RRRR
4      V! RRRR4      V! RRRR4      V! RRRR4      V! RRRR4      V! RRRR4      3	pV F  pV P                  VP                  R7      ;_uu_ 4        \        W8P                  4       VP                  RVP                  4       V! R R!7       V! V! R"R#4      VP                  4       R R R 4       K  	  \        VR$4       VP                  R%R&R4       V! R 4       V! V! R"R#4      R'4       R #   + '       g   i     K  ; i))Testsz"Empty line inserts with no indent.z  
  def __init__(self):z
  
  def __init__(self):
z1.endz+Inside bracket before space, deletes space.z  def f1(self, a, b):z  def f1(self,
         a, b):
z1.14z*Inside bracket after space, deletes space.z1.15z(Inside string with one line - no indent.z  """Docstring."""z  """Docstring.
"""
z&Inside string with more than one line.z%  """Docstring.
  Docstring Line 2"""z)  """Docstring.
  Docstring Line 2
  """
z2.18zBackslash with one line.za =\za =\
  
z"Backslash with more than one line.za =\
          multiline\z%a =\
          multiline\
          
z2.endz Block opener - indents +1 level.z  def f1(self):
    passz  def f1(self):
    
    pass
z Block closer - dedents -1 level.z  def f1(self):
    pass
  
)labelrg   N)eventrd   re   z&  def f1(self, a, b):
    return a + bselz1.17z-  def f1(self, a,
         
    return a + b
)rw   rh   rW   mark)r$   rn   rh   getnewline_and_indent_eventr   rD   rw   rg   mark_setrz   rW   tag_add)	r&   eqwrh   r{   nlTestInforV   tests	   &        r   test_indent_and_newline_event2IndentAndNewlineTest.test_indent_and_newline_eventz   s   KKvvhh''g'LM>59!# G1= " F1= " D.2 " BBH " 4!'!# >8F!# <5=!# <5;!#A$L DDJJ//tYY'h		23ue$dmm4	 0/  	t>?UFG,
4
3uePQ 0//s   AE**E;r*   N)
r+   r,   r-   r.   r/   r   r   r   r0   r1   r2   s   @r   rk   rk   e   s7          ;R ;Rr   rk   c                   F   a  ] tR t^t o ]R 4       t]R 4       tR tRtV t	R# )IndentSearcherTestc                    \        R 4       \        4       V n        V P                  P                  4        \	        V P                  4      V n        R# r
   )r   r   r   r   r   rh   r   s   &r   r   IndentSearcherTest.setUpClass   s1    4>r   c                >    V P                   P                  4        V = R # N)r   r   r   s   &r   r    IndentSearcherTest.tearDownClass   s    Hr   c                >   V P                   pV P                   pRpV Fh  w  rEV P                  VR7      ;_uu_ 4        \        W4       \        P                  ! V4      P                  4       pV P                  We4       RRR4       Kj  	  R#   + '       g   i     K  ; i)r?   N)code))r?   NN)z[1,r   )if 1:
)r   N)zif 1:
  2
  3
)r   z  2
)rh   rD   rg   r   IndentSearcherrunr$   )r&   rh   searcher	test_infor   expected_pairactual_pairs   &      r   test_searcher IndentSearcherTest.test_searcher   s|    yyII	 $-D4((t"$33D9==?  < )( $-(((s   ABBr*   N)
r+   r,   r-   r.   r/   r   r   r   r0   r1   r2   s   @r   r   r      s5     " "  = =r   r   c                   Z   a  ] tR t^t o ]R 4       t]R 4       t ! R R4      tR tRt	V t
R# )	RMenuTestc                    \        R 4       \        4       V n        V P                  P                  4        \	        V P                  R7      V n        R# rm   )r   r   r   r   r#   rn   r   s   &r   r   RMenuTest.setUpClass   s2    4*
r   c                :   V P                   P                  4        V = V P                  P                  4        V P                  P                  P                  R R4       F  pV P                  P                  V4       K   	  V P                  P                  4        V =R# r   rr   r   s   & r   r   RMenuTest.tearDownClass   rt   r   c                   &   a  ] tR t^t o R tRtV tR# )RMenuTest.DummyRMenuc                    R # r   r*   )xys   &&r   tk_popupRMenuTest.DummyRMenu.tk_popup   s    Dr   r*   N)r+   r,   r-   r.   r   r0   r1   r2   s   @r   
DummyRMenur      s       r   r   c                    R # r   r*   )r&   s   &r   test_rclickRMenuTest.test_rclick   s    r   r*   N)r+   r,   r-   r.   r/   r   r   r   r   r0   r1   r2   s   @r   r   r      s?     + +  ! ! r   r   __main__)	verbosity)__doc__idlelibr   unittestcollectionsr   test.supportr   tkinterr   r   EditorWindowr#   TestCaser   r5   rg   rk   r   r   r+   mainr*   r   r   <module>r      s       " ! 			x(( ,:)) :zPR8,, PRf=** =<!! 4 zMMA r   