+
     Bih                     j   ^ RI Ht ^ RIt^ RIHt ^ RIt^ RIt^ RIHtH	t	 ^ RI
Ht ^ RIt^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ RIt^ R
IHtHtHt ^ RIHt ^ RIt^ RIHtHt  ! R R4      t  ! R R]PB                  4      t" ! R R]PB                  4      t#]$R8X  d   ]PJ                  ! ^R7       R# R# )    )dedentN)chain)requires	swap_attr)support)run_in_tk_mainloop)	Delegator)fixwordbreaks)
Percolator)fix_x11_pastePyShellPyShellFileList)fix_scaling)get_end_linenumber
get_linenoc                   2   a  ] tR t^t o R tR tR tRtV tR# )Dummy_editwinc                    Wn         V P                   P                  V n        \        V4      V n        \        4       V n        V P                  P                  V P                  4       R # N)textmaster
text_framer   perr	   undoinsertfilter)selfr   s   &&5/usr/lib/python3.14/idlelib/idle_test/test_sidebar.py__init__Dummy_editwin.__init__   sC    	))**d#K	dii(    c                    R # r    )r   namevalues   &&&r   setvarDummy_editwin.setvar   s    r    c                \    \        \        V P                  P                  V4      4      4      # r   )intfloatr   index)r   r*   s   &&r   	getlinenoDummy_editwin.getlineno"   s    5/011r    )r   r   r   r   N)	__name__
__module____qualname____firstlineno__r   r%   r+   __static_attributes____classdictcell____classdict__s   @r   r   r      s     )2 2r    r   c                   <  a  ] tR t^&t o ]R 4       t]R 4       tR tR tR t	R t
R tR tR	 tR
 tR tR tR tR tR tR t]P,                  ! R4      R 4       tR t]P,                  ! R4      R 4       t]P,                  ! R4      R 4       tR tR tR tRtV tR# )LineNumbersTestc                   \        R 4       \        P                  ! 4       V n        V P                  P	                  4        \        P
                  ! V P                  4      V n        V P                  P                  \        P                  \        P                  RR7       V P                  P                  ^^R7       V P                  P                  ^^R7       \        P                  ! V P                  ^P^\        P                  R7      V n        V P                  P                  ^^\        P                   R7       \#        V P                  4      V n        \        P&                  ! V P                  4      V P$                  n        R# )guiT)sidefillexpand)weight)widthheightwrap)rowcolumnstickyN)r   tkTkrootwithdrawFramer   packLEFTBOTHrowconfigurecolumnconfigureTextNONEr   gridNSEWr   editwin	Scrollbarvbarclss   &r   
setUpClassLineNumbersTest.setUpClass(   s    557#((+rwwtD##Aa#0&&q&3773>>BRWWM!Abgg6#CHH-<<7r    c                    V P                   P                  P                  4        V P                  P	                  4        V P                  P                  4        V =V =V = V =R # r   )rQ   r   closerE   update_idletasksdestroyr   r   rT   s   &r   tearDownClassLineNumbersTest.tearDownClass9   sG    !!#Hcnck38r    c                  a a \         P                  P                  S P                  4      S n        R RRR/S n        \         P                  P                  P                  oVV 3R lp\        P                  P                  P                  \         P                  P                  RV4      pVP                  4        S P                  VP                  4       RS n        V 3R lp\        P                  P                  P                  \         P                  P                  RV4      pVP                  4        S P                  VP                  4       R	# )

background#abcdef
foreground#123456c                 :   < VR 8X  d   SP                   # S! W4      # )
linenumber)highlight_cfg)themeelementorig_idleConf_GetHighlightr   s   &&r   mock_idleconf_GetHighlight9LineNumbersTest.setUp.<locals>.mock_idleconf_GetHighlightF   s"    ,&)))-e==r    GetHighlightTkFixedFontc                    < SP                   # r   )font_override)rE   
configTypesectionr   s   &&&r   mock_idleconf_GetFont4LineNumbersTest.setUp.<locals>.mock_idleconf_GetFontP   s    %%%r    GetFontN)idlelibsidebarLineNumbersrQ   rd   re   idleConfrk   unittestmockpatchobjectstart
addCleanupstoprn   )r   ri   GetHighlight_patcherrq   GetFont_patcherrh   s   f    @r   setUpLineNumbersTest.setUp@   s    !//55dllC*I*I7%,__%=%=%J%J"	>  (}}2299OO$$n6P R""$,112*	&"----44OO$$i1FH,,-r    c                >    V P                   P                  R R4       R# )1.0endN)r   deleter   s   &r   tearDownLineNumbersTest.tearDownW   s    		&r    c                f    \        \        \        V P                  P	                  R 4      4      4      # )sel)tuplemapstrr   
tag_rangesr   s   &r   get_selectionLineNumbersTest.get_selectionZ   s#    Sdii2259:;;r    c                    V P                   P                  P                  V R 24      pV^ ,          ^,           pV^,          ^,           pW43# )z.end -1c)rd   sidebar_textbbox)r   liner   xys   &&   r   get_line_screen_position(LineNumbersTest.get_line_screen_position]   sD    ++00D61BCGaKGaKtr    c                    V P                   P                  P                  4       R ,          pV P                  VR,          \        P
                  4       R# )stateN)rd   r   configassertEqualrC   DISABLED)r   r   s   & r   assert_state_disabled%LineNumbersTest.assert_state_disabledc   s7    ,,335g>rBKK0r    c                j    V P                   P                  P                  R \        P                  4      # )r   )rd   r   getrC   ENDr   s   &r   get_sidebar_text_contents)LineNumbersTest.get_sidebar_text_contentsg   s#    ++//rvv>>r    c                    R P                  \        \        \        \	        ^V^,           4      4      R.4      4      pV P                  V P                  4       V4       R# )
 N)joinr   r   r   ranger   r   )r   n_linesexpecteds   && r   assert_sidebar_n_lines&LineNumbersTest.assert_sidebar_n_linesj   sD    99U3sE!Wq[,A#BRDIJ7798Dr    c                Z    V P                  V P                  P                  R R4      V4      # )r   r   )r   r   r   )r   r   s   &&r   assert_text_equals"LineNumbersTest.assert_text_equalsn   s$    		eU ;XFFr    c                (    V P                  ^4       R#    N)r   r   s   &r   test_init_emptyLineNumbersTest.test_init_emptyq   s    ##A&r    c                    V P                   P                  R R4       V P                  R4       V P                  ^4       R# )insertNzfoo bar
foo bar
foo bar
zfoo bar
foo bar
foo bar

)r   r   r   r   r   s   &r   test_init_not_empty#LineNumbersTest.test_init_not_emptyt   s3    		=1 45##A&r    c                   V P                  V P                  P                  R 4       V P                  P                  4        V P                  V P                  P                  R4       V P                  P	                  4        V P                  V P                  P                  R 4       V P                  P	                  4        V P                  V P                  P                  R 4       V P                  P                  4        V P                  V P                  P                  R4       V P                  P                  4        V P                  V P                  P                  R4       R# )FTN)r   rd   is_shownshow_sidebarhide_sidebarr   s   &r   test_toggle_linenumbering)LineNumbersTest.test_toggle_linenumberingy   s    1159$$&1148$$&1159$$&1159$$&1148$$&1148r    c                v   V P                   P                  R R4       V P                  R4       V P                  ^4       V P	                  4        V P                   P                  R R4       V P                  R4       V P                  ^4       V P	                  4        V P                   P                  R R	4       V P                  R4       V P                  ^4       V P	                  4        V P                   P                  R R4       V P                  R4       V P                  ^4       V P	                  4        R# )
r   foobarfoobar
z
foozfoobar
foo
zfoobar
foohello
hello

z
worldzfoobar
foohello
hello

world
Nzhello
hello
)r   r   r   r   r   r   s   &r   test_insertLineNumbersTest.test_insert   s    		8,
+##A&""$		7+0##A&""$		;/ =>##A&""$		9- DE##A&""$r    c                l   V P                   P                  R R4       V P                  R4       V P                   P                  RR4       V P                  R4       V P	                  ^4       V P                  4        V P                   P                  R R4       V P                  R4       V P	                  ^4       V P                  4        V P                   P                  RR4       V P                  R	4       V P	                  ^4       V P                  4        V P                   P                  RR
4       V P                  R4       V P	                  ^4       V P                  4        V P                   P                  RR
4       V P                  R4       V P	                  ^4       V P                  4        R# )r   r   r   z1.1z1.3zfbar
zfbarfoo
foo

2.0z2.endz
fbarfoo


r   zfba
r   r   Nzfoo
foo
)r   r   r   r   r   r   r   s   &r   test_deleteLineNumbersTest.test_delete   sU   		8,
+		&)##A&""$		9- 23##A&""$ 			(0##A&""$		&(##A&""$ 			&%##A&""$r    c                  a  V 3R  lpS P                  ^4       S P                  V! 4       ^4       S P                  P                  RR4       S P                  ^4       S P                  V! 4       ^4       S P                  P                  RR4       S P                  ^	4       S P                  V! 4       ^4       S P                  P                  RR4       S P                  ^
4       S P                  V! 4       ^4       S P                  P                  RR4       S P                  ^4       S P                  V! 4       ^4       S P                  P	                  RR4       S P                  ^
4       S P                  V! 4       ^4       S P                  P	                  RR4       S P                  ^	4       S P                  V! 4       ^4       S P                  P                  RR4       S P                  ^c4       S P                  V! 4       ^4       S P                  P                  RR4       S P                  ^d4       S P                  V! 4       ^4       S P                  P                  RR4       S P                  ^e4       S P                  V! 4       ^4       S P                  P	                  RR4       S P                  ^d4       S P                  V! 4       ^4       S P                  P	                  RR4       S P                  ^c4       S P                  V! 4       ^4       S P                  P	                  RR4       S P                  ^14       S P                  V! 4       ^4       S P                  P	                  RR4       S P                  ^4       S P                  V! 4       ^4       S P                  P	                  R	R4       S P                  ^4       S P                  V! 4       ^4       R
# )c                  h   < S P                   P                  P                  4       R ,          R,          # )r=   r   )rd   r   r   r   s   r   	get_width:LineNumbersTest.test_sidebar_text_width.<locals>.get_width   s&    ??//668A"EEr    r   foozfoo
zinsert -1l linestartzinsert linestartz50.0 -1czend -1cz5.0 -1cr   Nz foo
foo
foo
foo
foo
foo
foo
foo
ah  foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
)r   r   r   r   r   )r   r   s   f r   test_sidebar_text_width'LineNumbersTest.test_sidebar_text_width   s   
	F 	##A&a(		5)##A&a(		9-##A&a(		7+##B'a(		7+##B'a(		/1CD##B'a(		/1CD##A&a(		:.##B'a(		7+##C(a(		7+##C(a(		/1CD##C(a(		/1CD##B'a(		Y/##B'a(		I.##A&a( 				*##A&a(r    ztest disabledc                   V P                   P                  4        V P                  P                  R R4       V P                  P                  4        V P                  ^4      w  rV P                   P                  P                  RWR7       V P                   P                  P                  4        V P                  P                  4        V P                  V P                  4       R4       R# )r   zone
two
three
four

<Button-1>r   r   N)r   z3.0)rd   r   r   r   rE   updater   r   event_generater   r   )r   r   r   s   &  r   test_click_selection$LineNumbersTest.test_click_selection  s    $$&		 9:		 ,,Q/$$33LA3K$$++-		++-~>r    c                `   V P                  V4      w  r4V P                  V4      w  rVV P                  P                  P                  R W4R7       V P                  P                  4        R p\        \        \        V! W5^R7      4      \        \        V! WF^R7      4      4       FF  w  rV P                  P                  P                  RWR7       V P                  P                  4        KH  	  V P                  P                  P                  RWVR7       V P                  P                  4        R# )r   r   c              3      "   V^,
          p\        V4       F/  pW4,
          V,          V ,          WC,          V,          ,           x  K1  	  R# 5ir   )r   )absteps	last_stepis   &&&  r   lerp+LineNumbersTest.simulate_drag.<locals>.lerp  s:     	I5\!2a71=A:MMM "s   A
A)r   z<B1-Motion>z<ButtonRelease-1>N)	r   rd   r   r   rE   r   zipr   r(   )
r   
start_lineend_linestart_xstart_yend_xend_yr   r   r   s
   &&&       r   simulate_dragLineNumbersTest.simulate_drag  s    88D44X>$$33L6= 	4 	J			N CgB78CgB78
DA OO((777PII
 	$$334G6; 	4 	F		r    c                
   V P                   P                  4        V P                  P                  R R4       V P                  P                  4        V P                  ^^4       V P                  V P                  4       R4       R# r   zone
two
three
four
five
N)r   z5.0	rd   r   r   r   rE   r   r   r   r   r   s   &r   test_drag_selection_down(LineNumbersTest.test_drag_selection_down+  b    $$&		 ?@		 	1a ++-~>r    c                
   V P                   P                  4        V P                  P                  R R4       V P                  P                  4        V P                  ^^4       V P                  V P                  4       R4       R# r   r   r   s   &r   test_drag_selection_up&LineNumbersTest.test_drag_selection_up5  r   r    c                   V P                   P                  4        V P                  P                  R R4       V P                  P                  4        V P                  P                  ^
R4       V P                  P                  4        V P                  V P                  P                  R4      R4       V P                  V P                   P                  P                  R4      R4       V P                   P                  P                  R^ ^ ^
R7       V P                  P                  4        V P                  V P                  P                  R4      R4       V P                  V P                   P                  P                  R4      R4       R# )r   unit@0,0z11.0<MouseWheel>r   r   deltaNa  line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
line
)rd   r   r   r   rE   r   yview_scrollr   r*   r   r   assertNotEqualr   s   &r   test_scrollLineNumbersTest.test_scroll?  s   $$&		/		 			r6*		0&955;;FCVL
 	$$33N671:< 	4 	> 			DIIOOF3V<DOO88>>vFOr    c                   V P                   pVP                  R ,          pRpV P                  W#4       VP                  4        W0n        VP                  4        VP                  4        V P                  VP                  R ,          V4       W n        VP                  4        V P                  VP                  R ,          V4       R# )font
TkTextFontN)rd   r   r   r   rn   update_fontr   r   )r   ln	orig_font	test_fonts   &   r   r  LineNumbersTest.test_fontT  s    __OOF+	 	I1 	&
 	0)< '
0)<r    c                R  a a S P                   o\        S P                  4      pR RRR/pVV 3R lpSP                  4        VS n        SP	                  4        SP                  4        V! V4       SP	                  4        V! V4       VS n        SP	                  4        V! V4       R# )r_   z#222222ra   z#ffff00c                    < SP                  SP                  R ,          V R ,          4       SP                  SP                  R,          V R,          4       R# )r_   ra   N)r   r   )colorsr  r   s   &r   assert_colors_are_equalFLineNumbersTest.test_highlight_colors.<locals>.assert_colors_are_equalq  s?    R__\:F<<PQR__\:F<<PQr    N)rd   dictre   r   update_colorsr   )r   orig_colorstest_colorsr	  r  s   f   @r   test_highlight_colors%LineNumbersTest.test_highlight_colorsk  s    __4--.#YiH	R
 	(
 	, 	, )
,r    )rn   re   rd   N) r-   r.   r/   r0   classmethodrV   r\   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rx   skipr   r   r   r   r   r  r  r1   r2   r3   s   @r   r6   r6   &   s     8 8  < <..'<1?EG''
9%*%<B)V ]]?#? $?2 ]]?#? $? ]]?#? $?P*=.- -r    r6   c                     a  ] tR tRt o RtRt]R 4       t]R 4       t]R 4       t	]R 4       t
R tR tR	 tR
 tR tR tR tR tR t]! 4       R 4       t]! 4       R 4       t]! 4       R 4       t]! 4       R 4       t]! 4       R 4       t]! 4       R 4       t]! 4       R 4       tR tR t]! 4       R 4       t]! 4       R 4       t]! 4       R 4       t V 3R lt!Rt"V t#R# )ShellSidebarTesti  Nc                   \        R 4       \        P                  ! 4       ;V n        pVP	                  4        \        V4       \        V4       \        V4       \        V4      ;V n	        pVP                  4        V P                  4        R# )r8   N)r   rC   rD   rE   rF   r   r
   r   r   flistrZ   
init_shell)rU   rE   r  s   &  r   rV   ShellSidebarTest.setUpClass  sc    %%'!4Ddd+D11	Er    c                
   V P                   e3   RV P                   n        V P                   P                  4        R V n         R V n        V P                  P                  4        V P                  P                  4        R V n        R # )NF)shell	executingrY   r  rE   rZ   r[   rT   s   &r   r\   ShellSidebarTest.tearDownClass  s[    99 "'CIIIIOOCI	!!#r    c                    V P                   P                  4       V n        ^
V P                  n        V P                  P                  4        \        V P                  P                  R4      ^,
          V n        R# )
   end-1cN)	r  
open_shellr  pollintervalrE   r   r   r   n_preface_linesrT   s   &r   r  ShellSidebarTest.init_shell  sL    II((*	!#		(BQFr    c                
   V P                   P                  P                  P                  V P                  ^,            R2R4       V P                   P
                  P                  4        V P                  P                  4        R# )r   .0r  N)	r  r   bottomr   r"  shell_sidebarupdate_sidebarrE   r   rT   s   &r   reset_shellShellSidebarTest.reset_shell  sW    		##s':':1'<&=R$@(K		..0r    c                    R V n         \        P                  V P                  P                  8w  d5   \        P                  V n         V P                  P                  \        n        V P	                  4        R # r   )_saved_stdoutsysstdoutr  r)  r   s   &r   r   ShellSidebarTest.setUp  sK    
 "::***!$D**CJr    c                P    V P                   e   V P                   \        n        R # R # r   )r,  r-  r.  r   s   &r   r   ShellSidebarTest.tearDown  s     )++CJ *r    c                x   V P                   P                  P                  p\        VP	                  \
        P                  4      4      pV Uu/ uF,  pVP                  V4      ^,          VP                  VR4      bK.  	  ppV P                  4       pV Uu. uF  qdP                  VR4      NK  	  up# u upi u upi )r   r   N)r  r'  canvaslistfindrC   ALLr   itemcgetget_shell_line_y_coordsr   )r   r3  textsr   texts_by_y_coordsline_y_coordsr   s   &      r   get_sidebar_lines"ShellSidebarTest.get_sidebar_lines  s    ))00V[[() 
 KKa &//$"?? 	 
 4468EF1%%a.FF

 Gs   2B2B7c                    V P                   P                  P                  4        V P                  V P	                  4       \        V4      ) R  V4       R # r   )r  r'  r(  r   r<  len)r   expected_liness   &&r   assert_sidebar_lines_end_with.ShellSidebarTest.assert_sidebar_lines_end_with  sE    

  //1""$c.&9%9%:;	
r    c                B   V P                   P                  p. pVP                  R 4      pVP                  R^4      ^,          R8w  d   VP                  V R24      pVP	                  V4      ;pe/   VP                  V^,          4       VP                  V R24      pKC  V# )r   .0z +1line linestartz +1line)r  r   r*   split	dlineinfoappend)r   r   y_coordsr*   lineinfos   &    r   r8  (ShellSidebarTest.get_shell_line_y_coords  s    zz

6";;sAq!S(JJ%(9:;E>>%00x=OOHQK(JJ%01Er    c                  a V P                   P                  P                  o\        SP	                  \
        P                  4      4      pVP                  V3R  lR7       V Uu. uF  pSP                  V4      ^,          NK  	  up# u upi )c                 4   < SP                  V 4      ^,          # )r   )r   )r   r3  s   &r   <lambda><ShellSidebarTest.get_sidebar_line_y_coords.<locals>.<lambda>  s    FKK$5a$8r    )key)	r  r'  r3  r4  r5  rC   r6  sortr   )r   r9  r   r3  s   &  @r   get_sidebar_line_y_coords*ShellSidebarTest.get_sidebar_line_y_coords  sg    ))00V[[()

8
9167D!!$$777s   $!Bc                    V P                  \        V P                  4       4      \        V P                  4       4      4       R # r   )assertLessEqualsetrR  r8  r   s   &r   assert_sidebar_lines_synced,ShellSidebarTest.assert_sidebar_lines_synced  s2    ..01,,./	
r    c                    V P                   pVP                  p\        VP                  R 4      4       F0  w  rEV^ 8  d   VP	                  R4       VP                  RVR4       K2  	  R# )r   <<newline-and-indent>>r   stdinN)r  r   	enumeraterF  r   r   )r   inputr  r   
line_indexr   s   &&    r   do_inputShellSidebarTest.do_input  sU    

zz )%++d*; <JA~##$<=KK$0 !=r    c                    V P                  4       pV P                  VR .\        V4      ^,
          ,          R.,           4       V P                  4        R # )N>>>)r<  r   r?  rW  )r   sidebar_liness   & r   test_initial_state#ShellSidebarTest.test_initial_state  sJ    ..0Fc-(1,-7	
 	((*r    c              #  ^   "   V P                  R 4       Rx  V P                  RR.4       R# 5i)r   Nrb  r_  rA  r   s   &r   test_single_empty_input(ShellSidebarTest.test_single_empty_input  s&     d**E5>:   +-c              #  ^   "   V P                  R 4       Rx  V P                  . RO4       R# 5i)z1
Nrb  Nrb  rg  r   s   &r   test_single_line_statement+ShellSidebarTest.test_single_line_statement  s#     e**+?@rj  c              #  p   "   V P                  \        R 4      4       Rx  V P                  . RO4       R# 5i)7            if True:
            print(1)

            Nrb  ...rr  rr  Nrb  )r_  r   rA  r   s   &r   test_multi_line_statement*ShellSidebarTest.test_multi_line_statement  s7      	f   	
 	** ,
 	s   46c              #  ~   "   V P                  R4       Rx  V P                  . RO4       V P                  4        R# 5i)1Nz11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
rl  )r_  rA  rW  r   s   &r   test_single_long_line_wraps,ShellSidebarTest.test_single_long_line_wraps  s0     &'**+?@((*s   ;=c              #    "   V P                   pVP                  pV P                  R 4       Rx  V P                  . RO4       VP	                  RR4       VP                  R4       Rx  V P                  . RO4       V P                  4        VP                  P                  ^ ,          P                  4        Rx  V P                  . RO4       V P                  4        R# 5i)zprint("a\nb\nc")
Nr   zinsert -1line linestartz<<squeeze-current-text>>)rb  NNNrb  rl  )
r  r   r_  rA  mark_setr   rW  squeezerexpandingbuttonsr;   )r   r  r   s   &  r   test_squeeze_multi_line_output/ShellSidebarTest.test_squeeze_multi_line_output$  s     

zz,-**+KLh"9;67**+?@((*''*113**+KL((*s   CC!c              #  <  "   V P                   P                  pV P                  4       pV P                  \	        R 4      4       Rx  V P                  . RO4       V P                  4       pV P                  W24       VP                  R4       Rx  V P                  . RO4       VP                  R4       VP                  R4       Rx  V P                  . RO4       VP                  RVP                  R4      4       VP                  R4       Rx  VP                  R	4       Rx  V P                  R.4       VP                  R
4       Rx  V P                  RR.4       VP                  R4       VP                  R4       Rx  V P                  . RO4       R# 5i)z6            if True:
            print(1)
            Nrb  rr  z<<interrupt-execution>>z<<history-previous>>r   z
insert -2lrZ  z<<undo>>z<<redo>>)rb  rr  rr  )rb  rr  rr  Nrb  )rb  rr  Nrb  rq  )
r  r   r<  r_  r   rA  r   r   rz  r*   )r   r   initial_sidebar_lineswith_block_sidebar_liness   &   r   test_interrupt_recall_undo_redo0ShellSidebarTest.test_interrupt_recall_undo_redo8  sa    zz $ 6 6 8f   	 	**+@A#'#9#9#; 4L 	56**+MN 	2356**+FG 	h

< 8945J'**E73J'**E5>:4545**5	
s   FFc           	   #    "   \         P                  ! R 4      ;_uu_ 4        \        V P                  RR4      ;_uu_ 4        V P	                  RRR,          ,           R,           4       Rx  V P                  V P                  4       R.4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i5i)ig+  r{  Nzx = rv  i'  r   rb  )r   adjust_int_max_str_digitsr   r  r_  r   r<  r   s   &r   test_very_long_wrapped_line,ShellSidebarTest.test_very_long_wrapped_linef  s     ..v66$**j$77MM&3v:-45T335w? 8 7677 766s5   C B2AB	B2
CB/*B22C	=	Cc                  a aaa S P                   P                  oR oV3R lp\        P                  P                  P                  \        P                  P                  RV4      oSP                  4        VV3R lpS P                  V4       V V3R lpS P                  V! 4       S4       SP                  4        S P                  V! 4       S4       R# )r   c                    < S# r   r"   )rE   ro   rp   r  s   &&&r   rq   9ShellSidebarTest.test_font.<locals>.mock_idleconf_GetFonts  s	    r    rs   c                  H   < S P                  4        SP                  4        R # r   )r~   r  )r   ru   s   r   cleanup+ShellSidebarTest.test_font.<locals>.cleanupx  s      "!r    c                    < SP                   p \        V P                  \        P                  4      4      pV Uu0 uF  q P                  VR 4      kK  	  ppSP                  \        V4      ^4       \        \        V4      4      # u upi )r   )
r3  r4  r5  rC   r6  r7  r   r?  nextiter)r3  r9  r   fontsr   ru   s       r   get_sidebar_font4ShellSidebarTest.test_font.<locals>.get_sidebar_font}  si    ^^FRVV,-E?DEut__T62uEESZ+U$$ Fs   BN)r  r'  rx   ry   rz   r{   rt   ru   rw   r|   r}   r   r  r   )r   rq   r  r  r   ru   r  s   f   @@@r   r  ShellSidebarTest.test_fontn  s    **** 		"----44OO$$i1FH	" 	 	% 	,.	:)+Y7r    c                  a aaaa S P                   P                  oR RRR/o\        P                  P                  P
                  oVV3R lp\        P                  P                  P                  \        P                  P                  RV4      oSP                  4        VV3R lpS P                  V4       V V3R lpS P                  V! 4       S4       SP                  4        S P                  V! 4       S4       R# )	r_   r`   ra   rb   c                 &   < VR9   d   S# S! W4      # )rd   )rd   consoler"   )rf   rg   rh   r  s   &&r   ri   JShellSidebarTest.test_highlight_colors.<locals>.mock_idleconf_GetHighlight  s    33""-e==r    rk   c                  H   < S P                  4        SP                  4        R # r   )r~   r  )r   ru   s   r   r  7ShellSidebarTest.test_highlight_colors.<locals>.cleanup  s     %%'!!#r    c                  B  < SP                   p \        V P                  \        P                  4      4      pV Uu0 uF  q P                  VR 4      kK  	  ppSP                  \        V4      ^4       \        \        V4      4      pV P                  R4      pRVRV/# u upi )r:   r_   ra   )r3  r4  r5  rC   r6  r7  r   r?  r  r  cget)r3  r9  r   fgsfgbgr   ru   s         r   get_sidebar_colorsBShellSidebarTest.test_highlight_colors.<locals>.get_sidebar_colors  s    ^^FRVV,-E=BCUT??40UCCSXq)d3iB\*B "lB77	 Ds   BN)r  r'  rt   ru   rw   rk   rx   ry   rz   r{   r|   r}   r   r  r   )r   ri   r  r  r   rh   ru   r  s   f   @@@@r   r  &ShellSidebarTest.test_highlight_colors  s    ****#YiH%,__%=%=%J%J"	>  (}}2299OO$$n& ( 	""$	$ 	 	8 	.0+>+-{;r    c              #    "   V P                   P                  pV P                   P                  pV P                  R4       Rx  V P	                  \        VR4      ^4       \        V4      pV P                  VP                  VP                  V R24      4      4       VP                  P                  R8X  d   ^M^xpVP                  P                  R8X  d    VP                  P                  R^ ^ R7       MVP                  P                  R^ ^ VR	7       Rx  V P                  VP                  VP                  V R24      4      4       VP                  P                  R8X  d    VP                  P                  R
^ ^ R7       M VP                  P                  R^ ^ V) R	7       Rx  V P                  VP                  VP                  V R24      4      4       R# 5i)zx = """Nr   r%  aquax11z
<Button-4>r   r   r   z
<Button-5>zox = """



































































































"""
)r  r'  r   r_  assertGreaterr   r   assertIsNotNonerG  r*   r3  _windowingsystemr   assertIsNone)r   ru   r   last_linenor   s   &    r   test_mousewheel ShellSidebarTest.test_mousewheel  s{    ****zz 	45:dF3Q7(.T^^DJJ+b7I,JKL ^^44>C >>**e3NN)),!q)ANN)).A%)P$..{m24F)GHI >>**e3NN)),!q)ANN)).A5&)QT^^DJJ+b7I,JKLs   GGc              #    "   V P                   P                  pV P                   P                  p\        V4      pV P	                  \        R 4      4       Rx  VP                  RV R2R4       VP                  RR4      pV P                  VR4       V P                  RV4       VP                  R	4       V P                  VP                  4       VP                  4       pV P                  WT4       R# 5i)
rp  Nr   r%  r  	sel.firstsel.lastz	if True:
z
1
z<<copy>>)r  r'  r   r   r_  r   tag_addr   assertStartsWithassertInr   r}   clipboard_clearclipboard_getr   )r   ru   r   
first_lineselected_textcopied_texts   &     r   	test_copyShellSidebarTest.test_copy  s     ****zz'-
f   	
 	Uzl"-x8j9m\:g}-J',,-((*4s   C1C3c           	   #    "   V P                   P                  pV P                   P                  p\        V4      pV P	                  \        R 4      4       Rx  VP                  RV R2R4       VP                  RR4      pV P                  VR4       VP                  RR4      pVP                  R	4      pVP                  4        R
.R.\        V4      ^,
          ,          ,           R.,           pR	P                  R \        VVRR7       4       4      R	,           pVP                  R4       V P                  VP                   4       VP#                  4       p	V P%                  W4       R# 5i)z;            if True:
                print(1)

            Nr   z.3r  r  r  zTrue:
zsel.first linestartr   rb  rr  c              3   R   "   T F  w  rVf   TMVR,           V,           x  K  	  R # 5i)N r"   ).0promptr   s   &  r   	<genexpr>:ShellSidebarTest.test_copy_with_prompts.<locals>.<genexpr>  s/      /
!1 NDt(;;!1s   %'T)strictz<<copy-with-prompts>>)r  r'  r   r   r_  r   r  r   r  rF  popr?  r   r   r   r}   r  r  r   )
r   ru   r   r  r  selected_lines_textselected_linesexpected_promptsselected_text_with_promptsr  s
   &         r   test_copy_with_prompts'ShellSidebarTest.test_copy_with_prompts  sI    ****zz'-
f   	
 	Uzl"-x8j9mY7"hh'<jI,2248 Gug^!4q!899TFB 	%)YY /
 #$4$2+/!1/
 &

 &" 	34,,-((*As   E'E)c                F   < V ^8  d   Qh/ S[ P                  ;R&   S[;R&   # )   rE   r  )rC   rD   r   )formatr4   s   "r   __annotate__ShellSidebarTest.__annotate__  s     
%%  r    )r,  )$r-   r.   r/   r0   rE   r  r  rV   r\   r  r)  r   r   r<  rA  r8  rR  rW  r_  rd  r   rh  rm  rs  rw  r}  r  r  r  r  r  r  r  __annotate_func__r1   r2   r3   s   @r   r  r    s    DE     G G  

,G
	8
1+ ; ;
 A A
  " + + + +& +
 +
Z @ @84<@ M M> 5 50 !B !Bq
  r    r  __main__)	verbosity)&textwrapr   r-  	itertoolsr   rx   unittest.mocktest.supportr   r   testr   tkinterrC   'idlelib.idle_test.tkinter_testing_utilsr   idlelib.delegatorr	   idlelib.editorr
   idlelib.percolatorr   idlelib.pyshellrt   r   r   r   idlelib.runr   idlelib.sidebarr   r   r   TestCaser6   r  r-   mainr"   r    r   <module>r     s     
    ,   F ' ( )  C C #  :2 2a-h'' a-HyBx(( yBx zMMA r    