
    ^h!                     >    S SK r S SKrS SKJr  S SKJr  S rS rS rg)    N)Path)Configc                  .    [         R                  S5        g )Nzload_ext storemagic)ipmagic     b/home/james-whalen/.local/lib/python3.13/site-packages/IPython/extensions/tests/test_storemagic.pysetup_moduler      s    HH"#r	   c                  *  ^  S[         R                  ;  d   S5       eS[         R                  ;  d   S5       eS[         R                  ;  d   S5       eS[         R                  ;  d   S5       eS	[         R                  S'   [         R                  S
5        S[         R                  S'   S[         R                  S'   [        R                  " 5       m [         R                  ST -   5        [         R                  S5        [         R                  S5        [         R                  S5        [         R
                  S   S	:X  d   eS[         R
                  S   ;   d   e[         R
                  S   S:X  d   e[         R
                  S   S:X  d   e[         R                  R                  SS 5        [         R                  R                  SS 5        [         R                  R                  SS 5        [         R                  R                  S5        [         R                  S5        / [         R                  S   S S & [         R                  S5        [         R                  S   S	:X  d   e[         R                  R                  S5      (       d   e[         R                  S   S:X  d   e[         R                  S   S:X  d   e[         R                  S5        [        U 4S j[         R                  S    5       5      (       d   e[        R                  " T 5        g )Nbarz.Error: some other test leaked `bar` in user_nsfooz.Error: some other test leaked `foo` in user_nsfoobarz1Error: some other test leaked `foobar` in user_nsfoobazz1Error: some other test leaked `foobaz` in user_nsN   zalias bar echo "hello"O   80zcd 	store fooz	store barzstore foobar foobazzautorestore/foostored_aliaseszautorestore/foobarzautorestore/foobazzcd -_dhzstore -r foo bar foobar foobazzstore -rc              3   X   >#    U  H  n[        T5      R                  U5      v   M!     g 7f)N)r   samefile).0ptmpds     r
   	<genexpr>%test_store_restore.<locals>.<genexpr>/   s%     A/@!tDz""1%%/@s   '*)r   user_nsr   tempfilemkdtempdbpopalias_managerundefine_aliasis_aliasanyosrmdir)r   s   @r
   test_store_restorer)   
   sR   

"T$TT"

"T$TT"2::%Z'ZZ%2::%Z'ZZ%BJJuHH%&BJJxBJJxDHHUT\HH[HH[HH"# 55"#r)))BEE*++++55%&",,,55%&$... JJNN5$JJNN8T"JJNN8T"##E*HHVBJJua HH-.::e"""$$U++++::h2%%%::h4'''HHZArzz%/@AAAAAHHTNr	   c                     S[         R                  S'   [         R                  S5        [         R                  S	 [        5       n SU R                  l        [         R                  n U [         l        [         R                  R                  S5        S[         R                  ;  d   eSU R                  l        [         R                  R                  S5        [         R                  S   S:X  d   e U[         l        g ! U[         l        f = f)N_   r   r   F
storemagicT)	r   r   r   r   StoreMagicsautorestoreconfigextension_managerreload_extension)corig_configs     r
   test_autorestorer4   3   s    BJJuHH[


5A %AMM))K 	
--l;BJJ&&&$(!
--l;zz% B&&&	K	s   &B	C< <D	)	r   r'   pathlibr   traitlets.config.loaderr   r   r)   r4   r   r	   r
   <module>r7      s      *$'R r	   