
    Og                     F   d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 d Z G d	 d
e      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Zd Z G d de      Z ee       G d de             Z eee       G d  d!e             Z ee      d"        Zd# Z ee      d$        Z ee      d%        Z G d& d'      Zdd(lm Z   e ed)      Z!e!e_"        d* Z# ee       G d+ d,e             Z$ e$       Z% ee       G d- d.e             Z& ee
       G d/ d0e             Z' ee       G d1 d2e             Z( e(d3      Z) ee       G d4 d5e             Z* G d6 d7e      Z+d9d8Z,y):z-Examples supporting Sphinx doctest snippets.
    N)	Interface)implementer)
IInterface)adapter)ICc                 H    t         j                  j                  d| z         y )Nz%s
)sysstdoutwritexs    X/var/www/djangounited/venv/lib/python3.12/site-packages/zope/component/tests/examples.pyr   r      s    JJVaZ     c                       e Zd Zy)	ITestTypeN__name__
__module____qualname__ r   r   r   r          r   r   c                       e Zd Zy)I1Nr   r   r   r   r   r       r   r   r   c                       e Zd Zy)I2Nr   r   r   r   r   r   #   r   r   r   c                       e Zd Zy)I3Nr   r   r   r   r   r   &   r   r   r   c                       e Zd Zy)I4Nr   r   r   r   r   r   )   r   r   r   c                       e Zd Zy)IGINr   r   r   r   r!   r!   ,   r   r   r!   c                       e Zd Zy)IQINr   r   r   r   r#   r#   /   r   r   r#   c                       e Zd Zy)ISINr   r   r   r   r%   r%   2   r   r   r%   c                       e Zd Zy)ISIINr   r   r   r   r'   r'   5   r   r   r'   c                       y Nr   )argss    r   noopr+   8   s    r   c                       e Zd Zd Zd Zy)Uc                     || _         y r)   )r   )selfnames     r   __init__z
U.__init__=   s	    r   c                 N    | j                   j                  d| j                  dS )N())	__class__r   r/   s    r   __repr__z
U.__repr__@   s    >>22DMMBBr   N)r   r   r   r1   r7   r   r   r   r-   r-   ;   s    Cr   r-   c                       e Zd Zy)U1Nr   r   r   r   r9   r9   C       r   r9   c                       e Zd Zy)U12Nr   r   r   r   r<   r<   G   r:   r   r<   c                      t        d| z         y )Nz
handle1 %sr   r   s    r   handle1r?   K   s    	,
r   c                  2    t        dt        |       z          y )Nzhandle2 )r   repr)objectss    r   handle2rC   O   s    	:W%&r   c                      t        d| z         y )Nz
handle3 %sr>   r   s    r   handle3rE   R       	<!r   c                      t        d| z         y )Nz
handle4 %sr>   r   s    r   handle4rH   V   rF   r   c                       e Zd Zy)GlobalRegistryNr   r   r   r   rJ   rJ   Z   r   r   rJ   )GlobalAdapterRegistryadaptersc                  8    t         j                  t        d       y )NrL   )baser1   rJ   r   r   r   
clear_baserO   `   s    MM.*-r   c                       e Zd Zd Zy)Obc                      y)Nz<instance Ob>r   r6   s    r   r7   zOb.__repr__f   s    r   Nr   r   r   r7   r   r   r   rQ   rQ   d       r   rQ   c                       e Zd Zd Zy)Ob2c                      y)Nz<instance Ob2>r   r6   s    r   r7   zOb2.__repr__n   s    r   NrS   r   r   r   rV   rV   l   s     r   rV   c                       e Zd Zy)Ob3Nr   r   r   r   rY   rY   q   r:   r   rY   c                       e Zd Zd Zy)Compc                     || _         y r)   contextr/   r^   s     r   r1   zComp.__init__w   	    r   Nr   r   r   r1   r   r   r   r[   r[   u   rT   r   r[      c                       e Zd Zd Zy)Comp2c                     || _         y r)   r]   r_   s     r   r1   zComp2.__init__~   r`   r   Nra   r   r   r   rd   rd   |   rT   r   rd   c                       e Zd ZdZd Zd Zy)ConformsToIComponentLookupzAAllow a dummy sitemanager to conform/adapt to `IComponentLookup`.c                     || _         y r)   )sitemanager)r/   ri   s     r   r1   z#ConformsToIComponentLookup.__init__   s
    &r   c                 0    ddl m} ||u r| j                  S y)zAThis method is specified by the adapter PEP to do the adaptation.r   )IComponentLookupN)zope.component.interfacesrk   ri   )r/   	interfacerk   s      r   __conform__z&ConformsToIComponentLookup.__conform__   s    >((### )r   N)r   r   r   __doc__r1   rn   r   r   r   rg   rg      s    K'$r   rg   c                 |    ddl m} dd l}ddlm} ddlm}  |         |          |d|j                                y )Nr   )	XMLConfig)setUp)tearDownz	meta.zcml)zope.configuration.xmlconfigrq   zope.componentzope.component.testingrr   rs   	component)testrq   zoperr   rs   s        r   	clearZCMLrz      s+    6,/J	G*Ik4>>*,r   r)   )-ro   r	   zope.interfacer   r   zope.interface.interfacesr   zope.component._declarationr   zope.component.testfiles.viewsr   r   r   r   r   r   r   r!   r#   r%   r'   r+   objectr-   r9   r<   r?   rC   rE   rH   rJ   zope.component.globalregistryrK   rN   rL   rO   rQ   obrV   rY   r[   comprd   rg   rz   r   r   r   <module>r      s   
 $ & 0 / -!	
 		 		 		 		 		) 		) 		) 		9 		C C R	 	 	 R	! 	 	 	 ' 	  	 	 	 @^Z8 . R  
 TR &     R	& 	 	 R6   AwRF  

$ 
$-r   