+
     Bi[}                        R t ^ RIHt ^ RIt^ RIt^ RIt^ RIHtHt ^ RI	t	^ RI	H
t
 ^ RIt^ RIHt ]P                  t]P                  t/ t]P"                  ! R4      ;t]R&   ]P"                  ! R4      ;t]R&   ]P"                  ! R4      ;t]R	&   ]P"                  ! R4      ;t]R
&   R tR t ! R R]	P0                  4      t ! R R]	P0                  4      t ! R R]	P0                  4      t ! R R]	P0                  4      t ! R R]	P0                  4      t ! R R]	P0                  4      t]R8X  d   ]	P@                  ! ^R7       R# R# )zTest config, coverage 93%.
(100% for IdleConfParser, IdleUserConfParser*, ConfigChanges).
* Exception is OSError clause in Save method.
Much of IdleConf is also exercised by ConfigDialog and test_configdialog.
)configN)captured_stderrfindfile)mock)Func main	highlightkeys
extensionsc                  :    \         \        n        R \        n        R# )TN)testcfgidleConfuserCfgidlelibtesting     4/usr/lib/python3.14/idlelib/idle_test/test_config.pysetUpModuler      s    HGOr   c                  :    \         \        n        R \        n        R# )FN)usercfgr   r   r   r   r   r   r   tearDownModuler   !   s    HGOr   c                   @   a  ] tR t^&t o RtRtR tR tR tR t	Rt
V tR# )	IdleConfParserTestzTest that IdleConfParser worksz
        [one]
        one = false
        two = true
        three = 10

        [two]
        one = a string
        two = true
        three = false
    c                   \         P                  ! R 4      pVP                  V P                   4       V P                  pV P	                  VP                  RRRR7      R4       V P	                  VP                  RRRR7      R4       V! VP                  RRRR7      ^
4       V! VP                  RR4      R	4       V P	                  VP                  RRRR7      R4       V P	                  VP                  RRRR7      R4       V! VP                  RR4      R
4       V! VP                  RR4      R4       V P                  VP                  RR4      4       V! VP                  RRRR7      R4       R# )r   onebooltypeFtwoTthreeintza stringtruefalsenotexistDEFAULTdefaultN)r   IdleConfParserread_stringassertEqualassertIsGetassertIsNone)selfparsereqs   &  r   test_getIdleConfParserTest.test_get5   s3   &&r*4;;' 	fjjFj;UCfjjFj;TB
6::eW5:126
6::eU#Z0fjjFj;TBfjjfj=uE 	6::eU#V,
6::eW%w/ 	&**UG45
6::eWi:8)Dr   c                   \         P                  ! R 4      pVP                  V P                   4       VP                  pV P	                  V! R4      . RO4       V P	                  V! R4      . RO4       V P                  V! R4      . 4       R# )r   r   r    z	not existN)r   r    r!   )r   r*   r+   GetOptionListassertCountEqualr,   )r0   r1   get_lists   &  r   test_get_option_list'IdleConfParserTest.test_get_option_listJ   sn    &&r*4;;'''huo/FGhuo/FG+.3r   c                    \         P                  ! R 4      pVP                  4        V P                  VP	                  4       . 4       R# )r   N)r   r*   Loadr,   sectionsr0   r1   s   & r   test_load_nothing$IdleConfParserTest.test_load_nothingR   s2    &&r**B/r   c                    \        R RR7      p\        P                  ! V4      pVP                  4        V P	                  VP                  RR4      R4       V P	                  VP                  R4      R.4       R# )cfgparser.1
configdatasubdirFoo BarfoonewbarN)r   r   r*   r<   r,   r.   r6   )r0   config_pathr1   s   &  r   test_load_file!IdleConfParserTest.test_load_fileW   s_    }\B&&{3Iu5x@--i85'Br   r   N)__name__
__module____qualname____firstlineno____doc__r   r3   r9   r?   rJ   __static_attributes____classdictcell____classdict__s   @r   r   r   &   s+     (
FE*40
C Cr   r   c                   R   a  ] tR t^at o RtRR ltR tR tR tR t	R t
R tR	tV tR
# )IdleUserConfParserTestz"Test that IdleUserConfParser worksc                .    \         P                  ! V4      # N)r   IdleUserConfParser)r0   paths   &&r   
new_parser!IdleUserConfParserTest.new_parserd   s    ((..r   c                $   V P                  4       pVP                  R 4       V P                  VP                  R RR4      4       V P	                  VP                  R RR4      4       V P                  VP                  R RR4      4       V P                  VP                  R R4      R4       V P                  VP                  RRR4      4       V P                  VP                  4       RR .4       V P                  VP                  RR4      R4       R# )Foobarr#   r$   BarN)	r[   add_section
assertTrue	SetOptionassertFalser,   r.   r7   r=   r>   s   & r   test_set_option&IdleUserConfParserTest.test_set_optiong   s    "5!((v>?))%?@((w?@E517; 	((v>?foo/%@E516:r   c                4   V P                  4       pVP                  R 4       VP                  R RR4       V P                  VP	                  R R4      4       V P                  VP	                  R R4      4       V P                  VP	                  RR4      4       R# )r^   r_   r#   NotExistN)r[   
AddSectionrc   rb   RemoveOptionrd   r>   s   & r   test_remove_option)IdleUserConfParserTest.test_remove_optionw   s}    "% v.++E59:,,UE:;,,UG<=r   c                   V P                  4       pV P                  VP                  4       . 4       VP                  R 4       VP                  R 4       VP                  R4       V P	                  VP                  4       RR .4       R# )r^   r`   N)r[   r,   r=   rj   r7   r>   s   & r   test_add_section'IdleUserConfParserTest.test_add_section   sl    "*B/ 	% % % foo/%@r   c                6   V P                  4       pVP                  R 4       VP                  R4       VP                  RRR4       V P                  VP	                  4       . RO4       VP                  4        V P                  VP	                  4       R.4       R# )r^   r`   IdlenamevalN)r`   r^   rr   )r[   rj   rc   r7   r=   RemoveEmptySectionsr,   r>   s   & r   test_remove_empty_sections1IdleUserConfParserTest.test_remove_empty_sections   sy    "% % /foo/1GH""$*VH5r   c                   V P                  4       pVP                  R 4       VP                  R4       V P                  VP                  4       4       V P	                  VP                  4       . 4       VP                  R RR4       VP                  R4       V P                  VP                  4       4       V P                  VP                  4       R .4       R# )r^   r`   r_   r$   N)	r[   rj   rb   IsEmptyr,   r=   rc   rd   r7   r>   s   & r   test_is_empty$IdleUserConfParserTest.test_is_empty   s    "% % ()*B/w/% )*foo/%9r   c                   \         P                  ! 4       ;_uu_ 4       p\        P                  P	                  VR 4      pV P                  V4      pVP                  R4       VP                  RRR4       V P                  \        P                  P                  V4      4       VP                  4        V P                  \        P                  P                  V4      4       VP                  R4       VP                  4        V P                  \        P                  P                  V4      4       RRR4       R#   + '       g   i     R# ; i)ztest.cfgr^   r_   r#   N)tempfileTemporaryDirectoryosrZ   joinr[   rj   rc   rd   existsSaverb   remove_section)r0   tdirrZ   r1   s   &   r   	test_save IdleUserConfParserTest.test_save   s    ((**d77<<j1D__T*Fe$UE62 RWW^^D12KKMOOBGGNN401 !!%(KKMRWW^^D12 +***s   DD99E
	r   N)r   )rL   rM   rN   rO   rP   r[   re   rl   ro   rv   rz   r   rQ   rR   rS   s   @r   rV   rV   a   s1     ,/; >	A6:3 3r   rV   c                     a  ] tR t^t o Rt]R 4       t]R 4       tR$R ltR t	]
P                  ! ]P                  P                  R4      R4      R 4       t]
P                  ! ]P                  P                  R4      '       * R	4      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R tR t R t!R t"R t#R t$R t%R  t&R! t'R"t(V t)R## )%IdleConfTestzTest for idleConfc                f   / V n         \        P                  ! R R7      p\        R8w  d%   \        P
                  P                  \        4      pM4\        P
                  P                  \        P
                  ^ ,          4      pVP                   Fc  p\        P
                  P                  VRV,          4      p\        V4      ;_uu_ 4       pVP                  4       V P                   V&   RRR4       Ke  	  \        P                  V n        \!        4       \        n        R#   + '       g   i     K  ; i)T_utest__main__z../config-%s.defN)config_stringr   IdleConfrL   r   rZ   dirname__file__abspathsysconfig_typesr   openread_warn	orig_warnr   )clsconfidle_dirctyperI   fs   &     r   
setUpClassIdleConfTest.setUpClass   s    d+z!wwx0Hwwsxx{3H&&E'',,x1Ce1KLKk""a+,668!!%( #" '
 v	 #""s   DD0c                0    V P                   \        n        R # rX   )r   r   r   )r   s   &r   tearDownClassIdleConfTest.tearDownClass   s    }}r   c                0    \         P                  ! VR 7      # )r   )r   r   )r0   r   s   &&r   
new_configIdleConfTest.new_config   s    f--r   c                   \         P                  ! RR7      pVP                   F  p\         P                  ! R4      VP                  V&   VP                  V,          P                  V P                  V,          4       \         P                  ! R4      VP                  V&   VP                  V,          P                  V P                  V,          4       K  	  V# )zRReturn a mocked idleConf

Both default and user config used the same config-*.def
Tr   r   )	r   r   r   r*   
defaultCfgr+   r   rY   r   )r0   r   r   s   &  r   mock_configIdleConfTest.mock_config   s    
 d+&&E%+%:%:2%>DOOE"OOE"..t/A/A%/HI"(";";B"?DLLLL++D,>,>u,EF	 ' r   winzthis is test for unix systemc                   V P                  R R7      p\        P                  ! RRR7      ;_uu_ 4        \        P                  ! RR R7      ;_uu_ 4        V P                  VP	                  4       R4       RRR4       RRR4       \        P                  ! RRR7      ;_uu_ 4        \        P                  ! R	R
R7      ;_uu_ 4        \        P                  ! R4      ;_uu_ 4        V P                  VP	                  4       R4       RRR4       RRR4       RRR4       \        P                  ! RRR7      ;_uu_ 4        V P                  \        4      ;_uu_ 4        V P                  \        4      ;_uu_ 4        VP	                  4        RRR4       RRR4       RRR4       R#   + '       g   i     EL9; i  + '       g   i     ELE; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)Tr   os.path.expanduser	/home/fooreturn_valueos.path.existsz/home/foo/.idlercN~	os.getcwdz/home/foo/cpythonos.mkdirz/home/foo/cpython/.idlercos.path.join/path/not/existsr   r   patchr,   GetUserCfgDirassertRaises
SystemExitFileNotFoundErrorr0   r   s   & r   test_get_user_cfg_dir_unix'IdleConfTest.test_get_user_cfg_dir_unix   so    d+ ZZ,;GG,4@@  !3!3!57JK A H
 ZZ,3??K6IJJZZ
++$$T%7%7%9%@B , K @ ZZ5GHH"":..&&'899&&( : / IH A@@ HGG ,+ KJ @? :9 /. IHH   !F9!F%	5F9%!G3G 	%!GG 	G3>H,H	:HH	H,%F60	F99G
	GG 	 G0+G33H	HH	H)$H,,H=	zthis is test for Windows systemc                   V P                  R R7      p\        P                  ! RRR7      ;_uu_ 4        \        P                  ! RR R7      ;_uu_ 4        V P                  VP	                  4       R4       RRR4       RRR4       \        P                  ! RRR7      ;_uu_ 4        \        P                  ! R	R
R7      ;_uu_ 4        \        P                  ! R4      ;_uu_ 4        V P                  VP	                  4       R4       RRR4       RRR4       RRR4       \        P                  ! RRR7      ;_uu_ 4        V P                  \        4      ;_uu_ 4        V P                  \        4      ;_uu_ 4        VP	                  4        RRR4       RRR4       RRR4       R#   + '       g   i     EL9; i  + '       g   i     ELE; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)Tr   r   zC:\foor   r   zC:\foo\.idlercNr   r   zC:\foo\cpythonr   zC:\foo\cpython\.idlercr   r   r   r   s   & r   test_get_user_cfg_dir_windows*IdleConfTest.test_get_user_cfg_dir_windows   so    d+ ZZ,9EE,4@@  !3!3!57IJ A F
 ZZ,3??K6HIIZZ
++$$T%7%7%9%@B , J @ ZZ5GHH"":..&&'899&&( : / IH A@@ FEE ,+ JI @? :9 /. IHHr   c           
        V P                  R R7      pRp\        P                  P                  RR/4      ;_uu_ 4        \        P                  ! RVR7      ;_uu_ 4        VP	                  4        RRR4       RRR4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       VP                  P                  4        F#  pV P                  V\        P                  4       K%  	  VP                  P                  4        F#  pV P                  V\        P                  4       K%  	  VP                  P                  4        FC  w  rVV P                  VP                   \"        P$                  P'                  VRV R	24      4       KE  	  VP                  P                  4        FW  w  rVT P                  VP                   \"        P$                  P'                  VP(                  ;'       g    R
RV R24      4       KY  	  R#   + '       g   i     EL; i  + '       g   i     EL; i)Tr   r   rL   __foo__zos.path.dirnamer   Nzconfig-z.def#z.cfg)r   r   r   dictCreateConfigHandlersr7   r   r   r   valuesassertIsInstancer   r*   rY   itemsr,   filer   rZ   r   userdir)r0   r   r   default_parseruser_parsercfg_typer1   s   &      r   test_create_config_handlers(IdleConfTest.test_create_config_handlers  s   d+ ZZ__j)455-HEE))+ F 6
 	doot/@/@AdllD,=,=> #oo446N!!.&2G2GH 7<<..0K!!+v/H/HI 1 !% 5 5 7HV[[WW\\(ghZt4LMO !8 !% 2 2 4HV[[WW\\$,,*=*=#
RV?WXZ !5# FEE 655s#   !H:H&	0H:&H71	H::I	c                X   V P                  R R7      p\        RRR7      p\        P                  ! V4      VP                  R&   \        P
                  ! V4      VP                  R&   VP                  4        V P                  pV! VP                  R,          P                  RR4      R4       V! VP                  R,          P                  R4      R.4       V! VP                  R,          P                  RR4      R4       V! VP                  R,          P                  R4      R.4       R# )	Tr   rB   rC   rD   rG   rF   rH   N)r   r   r   r*   r   rY   r   LoadCfgFilesr,   r.   r6   )r0   r   rI   r2   s   &   r   test_load_cfg_files IdleConfTest.test_load_cfg_files&  s    d+ }\B!'!6!6{!C$77DU 	 	4??5!%%i7B
4??5!//	:UGD 	4<<""9e4h?
4<<,,Y7%Ar   c                   V P                  4       p\        P                  ! R 4      ;_uu_ 4       pVP                  4        V P	                  VP
                  \        VP                  4      4       RRR4       R#   + '       g   i     R# ; i)z&idlelib.config.IdleUserConfParser.SaveN)r   r   r   SaveUserCfgFilesr,   
call_countlenr   )r0   r   ms   &  r   test_save_user_cfg_files%IdleConfTest.test_save_user_cfg_files;  s[    !ZZ@AAQ!!#Q\\3t||+<= BAAAs   A A99B
	c                   V P                  4       pV P                  pV! VP                  R RR4      R4       V! VP                  R RRRR7      ^P4       \        P                  ! R4      ;_uu_ 4       pV! VP                  R RRRR7      R4       V! VP                  R RR	4      R4       V! VP                  R RR	R
R7      R
4       V! VP
                  ^4       RRR4       R#   + '       g   i     R# ; i)r   EditorWindowwidth80r"   r   idlelib.config._warnfontN	NotExistsNEr(   )r   r,   	GetOptionr   r   r   )r0   r   r2   r   s   &   r   test_get_optionIdleConfTest.test_get_optionB  s    !
4>>&.':DA
4>>&.'>FKZZ.//5t~~fnf5~I4Pt~~fnkBDIt~~fnk4~PRVWu#	 0///s   1A&C!!C2	c                    V P                  4       pVP                  R RRR4       V P                  VP                  R RR4      R4       R# )r   r^   r_   rH   N)r   rc   r,   r   r   s   & r   re   IdleConfTest.test_set_optionN  s?    !vueX6u=xHr   c                   V P                  4       pV P                  VP                  R R4      . RO4       V P                  VP                  RR4      . RO4       V P                  \        P
                  4      ;_uu_ 4        VP                  RR4       RRR4       V P                  \        P                  4      ;_uu_ 4        VP                  R R4       RRR4       R#   + '       g   i     LT; i  + '       g   i     R# ; i)r)   r   userfoobarN	notexists)Generalr   PyShellIndentThemeKeysHistory	HelpFiles)r   r7   GetSectionListr   r   InvalidConfigSetInvalidConfigTyper   s   & r   test_get_section_list"IdleConfTest.test_get_section_listT  s    !	62-	. 	/-	.
 v6677&1 8v7788	;7 98 87888s    CC2C/	2D	c           	        V P                  4       pV P                  pV! VP                  R R4      RRRR/4       V! VP                  R R4      RRRR/4       VP                  RR	R
R4       VP                  RR	RR4       \        P
                  ! R4      ;_uu_ 4        V! VP                  R	R4      RRRR/4       RRR4       R#   + '       g   i     R# ; i)IDLE Classicnormal
foregroundz#000000
backgroundz#ffffffcursorblackr	   Foobarznormal-foregroundz#747474znormal-backgroundz#171717r   N)r   r,   GetHighlightrc   r   r   r0   r   r2   s   &  r   test_get_highlightIdleConfTest.test_get_highlighte  s    !
4^X6y9Ey9R 	S 	4^X6w9Ey9R 	S 	{H.A9M{H.A9MZZ.//t  84|Y7CY7P Q 0///s   CC	c                6   V P                  4       pV P                  VP                  R R4      VP                  RR4      4       V P                  \        P
                  4      ;_uu_ 4        VP                  RR4       RRR4       R#   + '       g   i     R# ; i)r)   r   r   badN)r   r,   GetThemeDictr   r   InvalidThemer   s   & r   test_get_theme_dict IdleConfTest.test_get_theme_dictw  sx    ! 	i8fn5	7 v2233e^4 4333s   *BB	c                    V P                  4       pV P                  VP                  4       VP                  R 4      4       V P                  VP	                  4       VP                  R4      4       R# )r   r   N)r   r,   CurrentThemecurrent_colors_and_keysCurrentKeysr   s   & r   test_get_current_theme_and_keys,IdleConfTest.test_get_current_theme_and_keys  sX    !**,d.J.J7.ST))+T-I-I&-QRr   c                h    V P                  4       pV P                  VP                  R 4      R4       R# )r   r   N)r   r,   r  r   s   & r   test_current_colors_and_keys)IdleConfTest.test_current_colors_and_keys  s+    !55g>Or   c                b   \         P                  pV P                  R R7      pR\         n        V P                  VP	                  4       R4       R\         n        V P                  VP	                  4       R4       R\         n        V P                  VP	                  4       R4       V\         n        R# )	Tr   win32IDLE Classic WindowsdarwinIDLE Classic OSX
some-linuxIDLE Modern UnixN)r   platformr   r,   default_keysr0   current_platformr   s   &  r   test_default_keysIdleConfTest.test_default_keys  s    <<d+**,.DE**,.@A#**,.@A (r   c                f   \         P                  R 4       V P                  p\        P                  pV! V! RR7      . 4       V! V! 4       R.4       V! V! RR7      R.4       V! V! RR7      RR.4       V! V! RRR7      RR.4       \         P                  R4       \         P                  R4       R	# )
zn
            [ZzDummy]
            enable = True
            [DISABLE]
            enable = False
            T)
shell_onlyZzDummy)editor_onlyF)active_onlyDISABLE)r%  r$  N)userextnr+   r,   r   GetExtensionsr   )r0   r2   iGEs   &  r   test_get_extensions IdleConfTest.test_get_extensions  s      	 $$
3$$
359+
34 9+.
35!Iy#9:
35d3i5KL	*	*r   c                    V P                  4       pV P                  VP                  VP                  R R4      4      . RO4       R# )r)   r   N)AutoCompleteCodeContextFormatParagraph
ParenMatchr#  )r   r7   RemoveKeyBindNamesr   r   s   & r   test_remove_key_bind_names'IdleConfTest.test_remove_key_bind_names  s=    !##D$7$7	<$PQW	Yr   c                    \         P                  R 4       V P                  pV! \        P	                  R4      R4       V! \        P	                  R4      R4       \         P                  R4       R# )=
            [ZzDummy]
            enable = True
            zz-inr#  zz-outN)r'  r+   r,   r   GetExtnNameForEventr   )r0   r2   s   & r   test_get_extn_name_for_event)IdleConfTest.test_get_extn_name_for_event  sZ      	 
8''/;
8''0$7	*r   c                    \         P                  R 4       V P                  \        P	                  R4      RR./4       \         P                  R4       R# )r5  r#  <<z-in>>!<Control-Shift-KeyRelease-Insert>N)r'  r+   r,   r   GetExtensionKeysr   r0   s   &r   test_get_extension_keys$IdleConfTest.test_get_extension_keys  sM      	 	229=<=>	@	*r   c                    \         P                  R 4       V P                  p\        P                  pV! V! R4      / 4       RR.RR./pV! V! R4      V4       \         P                  R4       R# )r5  r   r:  r;  z	<<z-out>>z!<Control-Shift-KeyRelease-Delete>r#  N)r'  r+   r,   r   GetExtensionBindingsr   )r0   r2   iGEBexpects   &   r   test_get_extension_bindings(IdleConfTest.test_get_extension_bindings  sr      	 ,,
4b!BC CDF
4	?F#	*r   c                   V P                  4       pV P                  pV! VP                  R R4      RR.4       V! VP                  RR4      RR.4       V! VP                  RR4      RR	.4       V! VP                  R
R4      R.4       V! VP                  RR4      R.4       V! VP                  RR4      . 4       V! VP                  R R4      . 4       R# )r  <<copy>>z<Control-Shift-Key-C>z<Control-Key-Insert>IDLE Classic Unixz<Alt-Key-w>z<Meta-Key-w>r  z<Control-Key-c>z<Control-Key-C>zIDLE Classic Mac<Command-Key-c>r  z
NOT EXISTSN)r   r,   GetKeyBindingr  s   &  r   test_get_keybinding IdleConfTest.test_get_keybinding  s    !
40*=$&<=	?
41:>N+	-
44jA 12	4
40*=@Q?RS
40*=@Q?RS 	4lJ7<
40,?Dr   c                    \         P                  pV P                  4       pR \         n        V P                  VP	                  4       VP                  VP                  4       4      4       V\         n        R# )r  N)r   r  r   r,   GetCurrentKeySet	GetKeySetr  r  s   &  r   test_get_current_keyset$IdleConfTest.test_get_current_keyset  sW    <<! $..0$..AQAQAS2TU (r   c                   V P                  4       pVP                  R ,          P                  R4       VP                  R ,          P                  R4       VP                  R ,          P                  RRR4       VP                  R ,          P                  RRR4       V P	                  VP                  R4      R,          R	4       R
# )r   r   Foobar_cfgBindingsenableTruenewfooz<Key-F3>r  z
<<newfoo>>r   N)r   r   ra   setr,   rO  r   s   & r   test_get_keysetIdleConfTest.test_get_keyset  s    ! 	%11(;%112FG%))(HfE%))*>*U(:;LI2Nr   c                &   V P                  4       pV P                  VP                  R 4      4       V P                  VP                  R4      4       V P                  VP                  R4      4       V P                  VP                  R4      4       R# )copycutzdel-word-rightz
not-existsN)r   rb   IsCoreBindingrd   r   s   & r   test_is_core_binding!IdleConfTest.test_is_core_binding  so    !**623**512**+;<=++L9:r   c                   V P                  4       pV P                  VP                  R 4      . 4       V P                  VP                  R4      . 4       V P                  \        P
                  4      ;_uu_ 4        V P                  VP                  R4      . 4       RRR4       V P                  VP                  4       VP                  R 4      VP                  R4      ,           4       VP                  R,          P                  RRR4       VP                  R,          P                  RRR	4       VP                  R,          P                  RR
R4       VP                  R,          P                  RRR4       V P                  VP                  R4      . RO4       V P                  VP                  4       VP                  R 4      VP                  R4      ,           4       R#   + '       g   i     ELP; i)r)   r   r  Nr   r   4zPython;https://python.org3zPython:https://python.org2z/Pillow;https://pillow.readthedocs.io/en/latest/1z/IDLE;C:/Programs/Python36/Lib/idlelib/help.html))IDLEz*C:/Programs/Python36/Lib/idlelib/help.htmlrd  )Pillowz(https://pillow.readthedocs.io/en/latest/rc  )Pythonzhttps://python.orgra  )
r   r,   GetExtraHelpSourceListr   r   r   r7   GetAllExtraHelpSourcesListr   rc   r   s   & r   test_extra_help_source_list(IdleConfTest.test_extra_help_source_list  s    ! 	44Y?D44V<bAv6677T88?D 8++-''	2T5P5PQW5XX	Z
 	V&&{C9TUV&&{C9TUV&&{C9jkV&&{C9jk44V<A	B 	++-''	2T5P5PQW5XX	Z 877s   :"G##G4	c                t   ^ RI Hp ^ RIHp ^ RIHp V P                  4       pV! R4       V! 4       pVP                  4        VP                  V! RRVR7      4      pT P                  VP                  VRR	4      VR
,          VR,          ^ 8:  d   ^
MVR,          VR,          34       VP                  4        ?R# )    )requires)Tk)FontguiTkFixedFontT)rs   r   rootr   r   familysizeweightN)test.supportrn  tkinterro  tkinter.fontrp  r   withdrawactualr,   GetFontdestroy)r0   rn  ro  rp  r   rs  r   s   &      r   test_get_fontIdleConfTest.test_get_font*  s    )%!tKK-4HILLv~6x[&	Q"AfIq{K	M
 	r   c                    V P                  4       pV P                  pV! VP                  4       R ,          R.4       V! VP                  4       R,          RR.4       V! VP                  4       R,          R.4       V! VP                  R4      R ,          RR	.4       V! VP                  R
4      R,          R.4       V! VP                  R4      R,          RR.4       V! VP                  R4      R,          RR.4       R# )z<<center-insert>>z<Control-l>rG  z<Control-c>z<Control-C>z<<history-next>>z<Alt-n>r  z<Control-Key-l>z<Control-Key-L>r  rI  rH  z<Alt-Key-n>z<Meta-Key-n>r  N)r   r,   GetCoreKeysr  s   &  r   test_get_core_keysIdleConfTest.test_get_core_keys=  s    !
412]OD
4j)M=+IJ
401I;?
4234GH01	3
4./
;>O=PQ
4/01CD>*	,
4./0BCN+	-r   r   N)F)*rL   rM   rN   rO   rP   classmethodr   r   r   r   unittestskipIfr   r  
startswithr   r   r   r   r   r   re   r   r  r	  r  r  r  r*  r2  r7  r>  rD  rK  rP  rX  r^  rj  r~  r  rQ   rR   rS   s   @r   r   r      s       % %. __S\\,,U35ST) U), __00779Z[) \),Z6B*>
$I8"Q$
5SP
( +$Y+++E"("O;Z6&- -r   r   c                      a  ] tR tRt o Rt]P                  tRt]P                  4       t	R t
R tR tR tR tR	 tR
tV tR# )CurrentColorKeysTestiM  zTest colorkeys function with user config [Theme] and [Keys] patterns.

colorkeys = config.IdleConf.current_colors_and_keys
Test all patterns written by IDLE and some errors
Item 'default' should really be 'builtin' (versus 'custom).
r   c                   V P                  V P                  R 4      V P                  4       \        P	                  R4       V P                  V P                  R 4      V P                  4       R\        R ,          R&   V P                  V P                  R 4      R4       R\        R ,          R&   V P                  V P                  R 4      V P                  4       \        P                  R 4       R# )r   z<
            [Theme]
            default = True
            IDLE Newrs   non-existentN)r,   	colorkeysdefault_themeusermainr+   r   r=  s   &r   test_old_builtin_theme+CurrentColorKeysTest.test_old_builtin_themeX  s    0$2D2DE  	
 	0$2D2DE$.&!0*=$2&!0$2D2DE(r   c                t   \         P                  R 4       V P                  V P                  R4      R4       R\         R,          R&   V P                  V P                  R4      R4       R\         R,          R&   V P                  V P                  R4      V P                  4       \         P                  R4       R# )zZ
            [Theme]
            default = True
            name2 = IDLE Dark
            r   z	IDLE Darkr  rs   r  name2N)r  r+   r,   r  r  r   r=  s   &r   test_new_builtin_theme+CurrentColorKeysTest.test_new_builtin_themej  s      	
 	0+>$.&!0+>%3'"0$2D2DE(r   c                   \         P                  R 4       V P                  V P                  R4      V P                  4       \
        P                  R4       V P                  V P                  R4      R4       R\         R,          R&   V P                  V P                  R4      R4       \         P                  R4       \
        P                  R4       R# )z\
            [Theme]
            default = False
            name = Custom Dark
            r   z[Custom Dark]
a=bzCustom Darkr  r  N)r  r+   r,   r  r  userhighr   r=  s   &r   test_user_override_theme-CurrentColorKeysTest.test_user_override_themez  s      	
 	0$2D2DE120-@%3'"0-@(.r   c                h   V P                  V P                  R 4      V P                  4       \        P	                  R4       V P                  V P                  R 4      R4       R\        R ,          R&   V P                  V P                  R 4      V P                  4       \        P                  R 4       R# )r   z`
            [Keys]
            default = True
            name = IDLE Classic Unix
            rH  r  rs   N)r,   r  r  r  r+   r   r=  s   &r   test_old_builtin_keys*CurrentColorKeysTest.test_old_builtin_keys  s    /1B1BC  	
 	/1DE#1 /1B1BC'r   c                t   \         P                  R 4       V P                  V P                  R4      R4       R\         R,          R&   V P                  V P                  R4      R4       R\         R,          R&   V P                  V P                  R4      V P                  4       \         P                  R4       R# )z`
            [Keys]
            default = True
            name2 = IDLE Modern Unix
            r   r  rH  rs   r  r  N)r  r+   r,   r  r  r   r=  s   &r   test_new_builtin_keys*CurrentColorKeysTest.test_new_builtin_keys  s      	
 	/1CD#6 /1CD$2!/1B1BC'r   c                   \         P                  R 4       V P                  V P                  R4      V P                  4       \
        P                  R4       V P                  V P                  R4      R4       R\         R,          R&   V P                  V P                  R4      R4       \         P                  R4       \
        P                  R4       R# )z[
            [Keys]
            default = False
            name = Custom Keys
            r   z[Custom Keys]
a=bzCustom Keysr  r  N)r  r+   r,   r  r  userkeysr   r=  s   &r   test_user_override_keys,CurrentColorKeysTest.test_user_override_keys  s      	
 	/1B1BC12/?$2!/?'.r   r   N)rL   rM   rN   rO   rP   r   r  r  r  r  r  r  r  r  r  r  rQ   rR   rS   s   @r   r  r  M  sM      00I"M((*L)$) /"(( / /r   r  c                      a  ] tR tRt o R/ R/ R/ R/ /tR tRRRR	//RR
RR//RRRR//R/ /tR tR tR t	R t
R tR tR tR tR tRtV tR# )ChangesTesti  r   r	   r
   r   c                    V P                   pVP                  R RRR4       VP                  RRRR4       VP                  RR	R
R4       V# )r   Msecmitemmvalr	   Hsechitemhvalr
   Kseckitemkvalchanges
add_optionr0   r  s   & r   loadChangesTest.load  sL    ,,667F;;@667F;r   r  r  r  r  r  r  r  r  r  c                :    \         P                  ! 4       V n        R # rX   )r   ConfigChangesr  r=  s   &r   setUpChangesTest.setUp  s    ++-r   c                R    V P                  V P                  V P                  4       R # rX   )r,   r  emptyr=  s   &r   	test_initChangesTest.test_init  s    tzz2r   c                    V P                  4       pV P                  WP                  4       VP                  R RRR4       V P                  WP                  4       R# )r   r  r  r  N)r  r,   loadedr  r  s   & r   test_add_optionChangesTest.test_add_option  sE    ))+++.667F;++.r   c                   V P                   P                  pV P                  V! R RRR4      4       V P                  V! R RRR4      4       V P	                  \
        R,          R,          R4       V P                  V! R RRR4      4       V P	                  \
        R,          R,          R4       V P                  V! R RRR4      4       V P                  \
        P                  RR4      4       \
        P                  R4       R# )r   r   what0
use-spacesrd  N)r  save_optionrb   rd   r,   r  
has_optionr   )r0   r  s   & r   test_save_optionChangesTest.test_save_option  s    ll..FHfcBCVXvsCD(+F3S9FHlCHI(+L93?FHlCHI,,X|DE)r   c                    V P                  4       pV P                  VP                  4       4       V P                  \        R ,          R,          R4       V P                  \
        R,          R,          R4       V P                  \        R,          R,          R4       VP                  R	R RR4       V P                  VP                  4       4       \        P                  R 4       \
        P                  R4       \        P                  R4       R
# )r  r  r  r  r  r  r  r  r  r   N)
r  rb   save_allr,   r  r  r  r  rd   r   r  s   & r   test_save_addedChangesTest.test_save_added  s    ))+((*+&)'2F;&)'2F;&)'2F;667F;))+,'''r   c                "   V P                   pVP                  R RRR4       VP                  R RRR4       VP                  4        V P	                  \
        P                  RR4      4       V P                  \
        P                  RR4      4       R# )r   r   re  idledocELDIcodeldiN)r  r  r  r  rd   r  r  rb   r  s   & r   test_save_helpChangesTest.test_save_help  ss    ,,FKC6;	B,,[&AB++K@Ar   c                F    V P                   pVP                  R RRR4       R# )r   r   r  rd  Nr  r  s   & r   test_save_defaultChangesTest.test_save_default  s    ,,68\3?r   c                   V P                  4       pVP                  R R4       V P                  WP                  4       R F}  w  r#\        V,          P                  VRR4       VP                  W#4       V P                  \        4      ;_uu_ 4        W,          V,           \        V,          V,           RRR4       K  	  R#   + '       g   i     K  ; i)r   fakers   valueN))r   r  )r
   r  )r  delete_sectionr,   r  r   rc   r   KeyError)r0   r  cfgtypesections   &   r   test_delete_sectionChangesTest.test_delete_section   s    ))+vv.++. DGG&&w@""74""8,, ) ) -, !E -,,s   $CCc                |    V P                  4       pVP                  4        V P                  WP                  4       R # rX   )r  clearr,   r  r  s   & r   
test_clearChangesTest.test_clear  s(    ))+**-r   )r  N)rL   rM   rN   rO   r  r  r  r  r  r  r  r  r  r  r  r  rQ   rR   rS   s   @r   r  r    s     BBr<CE v01FWf$56v/0B F
.3/
*
(B@	*. .r   r  c                   &   a  ] tR tRt o R tRtV tR# )WarningTesti  c                   V P                   p\        4       \        n        \	        4       ;_uu_ 4       p\        P
                  ! R R4       RRR4       V! \        P                  R04       V! XP                  4       R4       \	        4       ;_uu_ 4       p\        P
                  ! R R4       RRR4       V! VP                  4       R4       \	        4       ;_uu_ 4       p\        P
                  ! RR4       RRR4       V! \        P                  RR04       V! VP                  4       R	4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lh; i)
warningkeyNr   warn2yek)r  r  zwarning
)r  r  zwarn2
)r,   rW  r   _warnedr   r   getvalue)r0   Equalstderrs   &  r   	test_warnWarningTest.test_warn  s      &LLE* fnn012foo0&LLE* foo$&LL%( fnn0/BCfoo.   s#   D.EE.D>	E	E$	r   N)rL   rM   rN   rO   r  rQ   rR   rS   s   @r   r  r    s     / /r   r  r   )	verbosity)!rP   r   r   r   r   r}   rw  r   r   r  r   idlelib.idle_test.mock_idler   r   r   r   r   rY   r  r  r  r'  r   r   TestCaser   rV   r   r  r  r  rL   r   r   r   r   <module>r     sH  
  
 	  2    , ??



#66r: :76?"(";";B"? ?7;#66r: :76?#)#<#<R#@ @7< 
8C** 8CvP3X.. P3fV-8$$ V-rl/8,, l/^S.(## S.l/(## /$ zMMA r   