
    %
i                         d dl Z d dlmZ ddlmZ d ad Zd Zd Z G d d	          Z	 G d
 d          Z
 G d d          Z G d d          Zd Zd Zd Zedk    r e              e             dS dS )    N)wrap   )
CheckCleanc                     t          |                                           d         d d         }t          |                                          d         d d         }||k    S )N   )reprsplit)ob1ob2addr1addr2s       C:\Users\Dell Inspiron 16\Desktop\tws\AgrotaPowerBi\back-agrota-powerbi\mcp-client-agrota\venv\Lib\site-packages\win32com/test/testGatewayAddresses.pyCheckSameCOMObjectr   .   sR    IIOOa "%EIIOOa "%EE>    c                     |                      t          j                  }|                     t          j                  }t          ||          S N)QueryInterface	pythoncomIID_IUnknownr   )r   r   u1u2s       r   CheckObjectIdentityr   5   s>    			I2	3	3B			I2	3	3Bb"%%%r   c                 n    t          | |          s$t          dz  at          | d| d|d           d S d S )Nr   z are not identical (z, ))r   	numErrorsprint)r   r   whens      r   FailObjectIdentityr   ;   sT    sC(( >Q	<<3<<C<<<=====> >r   c                   "    e Zd Zg Zej        gZdS )DummyN)__name__
__module____qualname___public_methods_r   IID_IPersistStorage_com_interfaces_ r   r   r!   r!   B   s"        !56r   r!   c                   .    e Zd Zg Zej        ej        gZdS )Dummy2N)r"   r#   r$   r%   r   r&   IID_IExternalConnectionr'   r(   r   r   r*   r*   G   s*        %)r   r*   c                       e Zd Zg ZdS )DelegatedDummyN)r"   r#   r$   r%   r(   r   r   r-   r-   O   s        r   r-   c                   (    e Zd Zg Zej        gZd ZdS )Dummy3c                 \    |t           j        k    rt          t                                S d S r   )r   r+   r   r-   )selfiids     r   _query_interface_zDummy3._query_interface_W   s,    )333(())) 43r   N)r"   r#   r$   r%   r   r&   r'   r3   r(   r   r   r/   r/   S   s5        !56* * * * *r   r/   c                     t          t                      t          j                  } |                     t          j                  }t          | |d           |                    t          j                  }t          ||d           t          | |d           |                    t          j                  }t          | |d           t          ||d           t          ||d           |                    t          j                  }t          | |d           t          ||d           t          ||d	           t          ||d
           d S )Nz!IID_IPersistStorage->IID_IUnknownzIID_IUnknown->IID_IDispatchz"IID_IPersistStorage->IID_IDispatchz+IID_IPersistStorage->IID_IPersistStorage(2)z$IID_IUnknown->IID_IPersistStorage(2)z%IID_IDispatch->IID_IPersistStorage(2)z!IID_IPersistStorage->IID_IPersistzIID_IUnknown->IID_IPersistzIID_IDispatch->IID_IPersistz$IID_IPersistStorage(2)->IID_IPersist)	r   r!   r   r&   r   r   r   IID_IDispatchIID_IPersist)oo2o3o4o5s        r   TestGatewayInheritancer<   ]   s6    	UWWi344A	
		)0	1	1Bq"ABBB			92	3	3Br2<===q"BCCC			98	9	9Bq"KLLLr2EFFFr2FGGG			91	2	2Bq"ABBBr2;<<<r2<===r2EFFFFFr   c                     t          t                      t          j                  } |                     t          j                  }t          | |d           |                     t          j                  }t          | |d           t          ||d           |                    t          j                  }t          ||d           t          | |d           d S )Nz,IID_IPersistStorage->IID_IExternalConnectionz8IID_IPersistStorage->IID_IExternalConnection (stability)z,IID_IExternalConnection->IID_IPersistStoragezAIID_IPersistStorage->IID_IExternalConnection->IID_IPersistStorage)r   r*   r   r&   r   r+   r   )r7   r8   o22r9   s       r   TestMultiInterfacer?   v   s    VXXy455A	
		);	<	<Bq"LMMM 

9<
=
=Cq#MNNN
CK   
		98	9	9Br2MNNN	2R    r   c                      t                       t                       t          dk    rt          d           d S t          dt          d           d S )Nr   z	Worked okz
There werezerrors.)r<   r?   r   r   r(   r   r   testrA      sO    A~~klIy11111r   __main__)r   win32com.server.utilr   utilr   r   r   r   r   r!   r*   r-   r/   r<   r?   rA   r"   r(   r   r   <module>rE      si  J     % % % % % %      	  & & &> > >7 7 7 7 7 7 7 7
              * * * * * * * *G G G2  (2 2 2 zDFFFJLLLLL r   