
    }e                     T    d dl Zd dlmZ d dlmc mZ d dlm	Z	 dZ
dZdZd Zd Zd	 Zy)
    N)TemporaryDirectory)prepended_to_syspathz
def load_ipython_extension(ip):
    print("Running ext1 load")

def unload_ipython_extension(ip):
    print("Running ext1 unload")
z@
def load_ipython_extension(ip):
    print("Running ext2 load")
zN
def load_ipython_extension(ip):
    ip2 = get_ipython()
    print(ip is ip2)
c            	         t               j                  } t               5 }t        j                  j                  |d      }t        |dd      5 }|j                  t               d d d        t        j                  j                  |d      }t        |dd      5 }|j                  t               d d d        t        |      5  d| j                  vsJ d| j                  vsJ t        j                  d      5  | j                  d      J 	 d d d        d| j                  v sJ t        j                  d      5  | j                  d      d	k(  sJ 	 d d d        t        j                  d
      5  t        j                  dd      5  | j!                  d       d d d        d d d        t        j                  d
      5  | j#                  d      J 	 d d d        t        j                  d
      5  | j#                  d      dk(  sJ 	 d d d        | j#                  d      dk(  sJ t        j                  d      5  | j                  d      J 	 d d d        | j#                  d      dk(  sJ t        j                  d      5  | j!                  d       d d d        d d d        d d d        y # 1 sw Y   MxY w# 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   KxY w# 1 sw Y   PxY w# 1 sw Y   +xY w# 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   y xY w)Nzext1.pywutf-8encodingzext2.pyext1ext2zRunning ext1 loadzalready loadedzRunning ext1 unloadF)suppressz
not loadedzRunning ext2 loadzno unload function)get_ipythonextension_managerr   ospathjoinopenwriteext1_contentext2_contentr   loadedttAssertPrintsload_extensionAssertNotPrintsreload_extensionunload_extension)emtdr
   fr   s        C/usr/lib/python3/dist-packages/IPython/core/tests/test_extension.pytest_extension_loadingr!      s   		(	(B		 -,ww||B	*$g. 	"!GGL!	" ww||B	*$g. 	"!GGL!	" ""% $	,****** !45 9((08889RYY&&& ##$78 E((04DDDDE !67 0__%85I 0''/00
 !67 ;**62:::; ##$9: C**62lBBBC&&v.,>>> !45 9((08889 &&v.2FFFF !45 ,##F+,G$	,-, -,	" 	"	" 	"9 9
E E
0 00 0
; ;C C
9 9, ,G$	, $	,-, -,s  /L;J/$6L;J<0L;6L/9K	-L/;KL/0K0K#	K0"L/?K=L/1L
	3L/<L3L/L#L/L;/J9	4L;<K	L;	KL/K L/#K-(K00K:5L/=LL/
LL/L L/#L,(L//L8	4L;;Mc                     t               j                  } t               5 }t        j                  j                  |d      }t        |dd      5 }|j                  t               d d d        d| j                  vsJ t        |      5  t        j                  d      5  | j                  d      J 	 d d d        d| j                  v sJ 	 d d d        d d d        y # 1 sw Y   yxY w# 1 sw Y   7xY w# 1 sw Y   *xY w# 1 sw Y   y xY w)Nzext3.pyr   r   r   ext3True)r   r   r   r   r   r   r   r   ext3_contentr   r   r   r   r   )r   r   r#   r   s       r    test_extension_builtinsr&   M   s    		(	(B		 'ww||B	*$g. 	"!GGL!	" RYY&&&!"% 	'( 9((08889RYY&&&		'' '	" 	"9 9	' 	'' 'sS   /D C$#D C4C(2C4D C%	!D (C1-C44C=	9D  D	c                  X    t               j                  } | j                  d      dk(  sJ y )Nsyszno load function)r   r   r   )r   s    r    test_non_extensionr)   ]   s)    		(	(BU#'9999    )os.pathr   tempfiler   IPython.testing.toolstestingtoolsr   IPython.utils.syspathcontextr   r   r   r%   r!   r&   r)    r*   r    <module>r2      s9     ' " " =
/,d' :r*   