
    f                         d dl mZ d dlmZ d dlmZ d dlmZmZ d dlmZ d dl	Z	d dl
Z
 G d de	j                        Zd	 Zed
k(  r& e	j                         j!                   e              yy)    )nested_scopes)	Interface)
implements)DoesNotImplementBrokenImplementation)BrokenMethodImplementationNc                       e Zd Zd Zd Zy)Testc                      G d dt               } G d d      }| j                  t        t        ||       d |_        t        ||       | j                  |j                  |       y )Nc                       e Zd Zd Zy)Test.testSimple.<locals>.Ic                       y N r       v/var/dept/share/cheung/public_html/OutSchool/python/env/lib/python3.12/site-packages/Interface/tests/testImplements.pyfzTest.testSimple.<locals>.I.f       Tr   N__name__
__module____qualname__r   r   r   r   Ir          r   r   c                       e Zd Zy)Test.testSimple.<locals>.CN)r   r   r   r   r   r   Cr      s    r   r   c                      y r   r   selfs    r   <lambda>z!Test.testSimple.<locals>.<lambda>!       r   )r   assertRaisesr   r   r   assertEqual__implements__)r    r   r   s      r   
testSimplezTest.testSimple   sQ    		 	 	.
AqA1a))1-r   c                     G d dt               } G d dt                G fdd      }| j                  t        t        ||       | j                  t        t        |       d |_        t        ||       | j                  |j                  |f       | j                  t        t        |       |j                  |_        t        ||       t        |       y )Nc                       e Zd Zd Zy)Test.testAdd.<locals>.Ic                       y r   r   r   r   r   r   zTest.testAdd.<locals>.I.f*   r   r   Nr   r   r   r   r   r)   )   r   r   r   c                       e Zd Zd Zy)Test.testAdd.<locals>.I2c                       y r   r   r   r   r   gzTest.testAdd.<locals>.I2.g-   r   r   N)r   r   r   r.   r   r   r   I2r,   ,   r   r   r/   c                       e Zd ZW  Zy)Test.testAdd.<locals>.CN)r   r   r   r%   )r/   s   r   r   r1   /   s    Nr   r   c                      y r   r   r   s    r   r!   zTest.testAdd.<locals>.<lambda>5   r"   r   )r   r#   r   r   r   r$   r%   r.   )r    r   r   r/   s      @r   testAddzTest.testAdd'   s    		 		 		 	 	.
AqA.
ArB1a))B73.
ArBCC1a1br   N)r   r   r   r&   r3   r   r   r   r
   r
      s    .r   r
   c                  T    t        j                         } | j                  t              S r   )unittest
TestLoaderloadTestsFromTestCaser
   )loaders    r   
test_suiter9   A   s!     F''--r   __main__)
__future__r   r   Interface.Implementsr   Interface.Exceptionsr   r   r   r5   sysTestCaser
   r9   r   TextTestRunnerrunr   r   r   <module>rB      s[    %  + G ; (8 (V. ZH!!*,/ r   