
    ;e^                         d Z ddlZddlZddlZddlmZ d Z eej        ej                  \  Z	Z
Z eej        ej                  \  ZZZedk    r ej                     dS dS )zUnit tests for abc.py.    N)
isabstractc                       G  fddt           j                  } G  fddt           j                  } G  fddt           j                  }|||fS )Nc                   .    e Zd Z fdZ fdZ fdZdS )#test_factory.<locals>.TestLegacyAPIc                    t           j        d             }|                     |j                   d }|                     t          |d                      G d d          }|                     t          |            G d d|          }|                      |            j	        d	           |                     t          |j	        dd
                     d S )Nc                     d S N selfs    $/usr/lib/python3.11/test/test_abc.pyfoozMtest_factory.<locals>.TestLegacyAPI.test_abstractproperty_basics.<locals>.foo       4    c                     d S r	   r
   r   s    r   barzMtest_factory.<locals>.TestLegacyAPI.test_abstractproperty_basics.<locals>.bar         r   __isabstractmethod__c                   .    e Zd Zej        d             ZdS )Ktest_factory.<locals>.TestLegacyAPI.test_abstractproperty_basics.<locals>.Cc                     dS N   r
   r   s    r   r   zOtest_factory.<locals>.TestLegacyAPI.test_abstractproperty_basics.<locals>.C.foo   s    &'ar   N)__name__
__module____qualname__abcabstractpropertyr   r
   r   r   Cr      s'        %'' &%'''r   r   	metaclassc                   .     e Zd Ze fd            Z xZS )Ktest_factory.<locals>.TestLegacyAPI.test_abstractproperty_basics.<locals>.Dc                 *    t                      j        S r	   superr   r   	__class__s    r   r   zOtest_factory.<locals>.TestLegacyAPI.test_abstractproperty_basics.<locals>.D.foo       &+ggk1r   )r   r   r   propertyr   __classcell__r(   s   @r   Dr#      s0        1111 11111r   r-   r   F)r   r   
assertTruer   assertFalsehasattrassertRaises	TypeErrorassertEqualr   getattrr   r   r   r   r-   abc_ABCMetas        r   test_abstractproperty_basicsz@test_factory.<locals>.TestLegacyAPI.test_abstractproperty_basics   s   ! "!OOC4555WS*@AABBB( ( ( ( (k ( ( ( ( i+++2 2 2 2 2A 2 2 2 QQSSWa(((WQU,BEJJKKKKKr   c                    t           j        d             }|                     |j                   t          d             }|                     t          |dd                      G d d          }|                     t          |            G d d	|          }| 	                    |
                                d	           | 	                     |            
                                d	           d S )
Nc                     d S r	   r
   clss    r   r   zPtest_factory.<locals>.TestLegacyAPI.test_abstractclassmethod_basics.<locals>.foo$       $r   c                     d S r	   r
   r:   s    r   r   zPtest_factory.<locals>.TestLegacyAPI.test_abstractclassmethod_basics.<locals>.bar'   r<   r   r   Fc                   .    e Zd Zej        d             ZdS )Ntest_factory.<locals>.TestLegacyAPI.test_abstractclassmethod_basics.<locals>.Cc                     | j         S r	   r   r:   s    r   r   zRtest_factory.<locals>.TestLegacyAPI.test_abstractclassmethod_basics.<locals>.C.foo,   s
    %(\1r   N)r   r   r   r   abstractclassmethodr   r
   r   r   r   r?   +   s'        (11 )(111r   r   r    c                   .     e Zd Ze fd            Z xZS )Ntest_factory.<locals>.TestLegacyAPI.test_abstractclassmethod_basics.<locals>.Dc                 D    t                                                      S r	   r%   r;   r(   s    r   r   zRtest_factory.<locals>.TestLegacyAPI.test_abstractclassmethod_basics.<locals>.D.foo0       %*WW[[]]2r   r   r   r   classmethodr   r+   r,   s   @r   r-   rD   /   0        2222 22222r   r-   )r   rB   r.   r   rI   r/   r4   r1   r2   r3   r   r5   s        r   test_abstractclassmethod_basicszCtest_factory.<locals>.TestLegacyAPI.test_abstractclassmethod_basics#   s   $ %$OOC4555 [WS*@%HHIII2 2 2 2 2k 2 2 2 2 i+++3 3 3 3 3A 3 3 3 QUUWWc***QQSSWWYY,,,,,r   c                    t           j        d             }|                     |j                   t          d             }|                     t          |dd                      G d d          }|                     t          |            G d d	|          }| 	                    |
                                d
           | 	                     |            
                                d
           d S )Nc                      d S r	   r
   r
   r   r   r   zQtest_factory.<locals>.TestLegacyAPI.test_abstractstaticmethod_basics.<locals>.foo6       tr   c                      d S r	   r
   r
   r   r   r   zQtest_factory.<locals>.TestLegacyAPI.test_abstractstaticmethod_basics.<locals>.bar9   rN   r   r   Fc                   .    e Zd Zej        d             ZdS )Otest_factory.<locals>.TestLegacyAPI.test_abstractstaticmethod_basics.<locals>.Cc                      dS r   r
   r
   r   r   r   zStest_factory.<locals>.TestLegacyAPI.test_abstractstaticmethod_basics.<locals>.C.foo>       "#!r   N)r   r   r   r   abstractstaticmethodr   r
   r   r   r   rQ   =   s'        )## *)###r   r   r    c                   $    e Zd Zed             ZdS )Otest_factory.<locals>.TestLegacyAPI.test_abstractstaticmethod_basics.<locals>.Dc                      dS N   r
   r
   r   r   r   zStest_factory.<locals>.TestLegacyAPI.test_abstractstaticmethod_basics.<locals>.D.fooB   rS   r   Nr   r   r   staticmethodr   r
   r   r   r-   rV   A   #        ## ###r   r-   rY   )r   rT   r.   r   r[   r/   r4   r1   r2   r3   r   r5   s        r    test_abstractstaticmethod_basicszDtest_factory.<locals>.TestLegacyAPI.test_abstractstaticmethod_basics5   s   %O &%OOC4555O \WS*@%HHIII$ $ $ $ $k $ $ $ $ i+++$ $ $ $ $A $ $ $ QUUWWa(((QQSSWWYY*****r   N)r   r   r   r7   rK   r]   r6   s   r   TestLegacyAPIr      se        	L 	L 	L 	L 	L"	- 	- 	- 	- 	-$	+ 	+ 	+ 	+ 	+ 	+ 	+r   r_   c                   4   e Zd Zd Zd Z fdZ fdZ fdZ fdZ fdZ	 fdZ
 fd	Z fd
Z fdZ fdZ fdZ fdZ fdZ fdZ fdZ fdZ fdZd Z fdZd Z fdZ fdZ fdZ fdZ fdZd Z fdZ fdZ  fdZ!d S )!test_factory.<locals>.TestABCc                 2    G d dt           j                  }|                     t          |          t           j                   |                     t          |            G d d|          }|                     |                                d           d S )Nc                   >    e Zd Zeej        d                         ZdS )8test_factory.<locals>.TestABC.test_ABC_helper.<locals>.Cc                     | j         S r	   rA   r:   s    r   r   z<test_factory.<locals>.TestABC.test_ABC_helper.<locals>.C.fooM   
    %(\1r   Nr   r   r   rI   r   abstractmethodr   r
   r   r   r   rd   L   1        #11 $# 111r   r   c                   .     e Zd Ze fd            Z xZS )8test_factory.<locals>.TestABC.test_ABC_helper.<locals>.Dc                 D    t                                                      S r	   r%   rF   s    r   r   z<test_factory.<locals>.TestABC.test_ABC_helper.<locals>.D.fooS   rG   r   rH   r,   s   @r   r-   rk   R   rJ   r   r-   )r   ABCr3   typeABCMetar1   r2   r   )r   r   r-   s      r   test_ABC_helperz-test_factory.<locals>.TestABC.test_ABC_helperJ   s    2 2 2 2 2CG 2 2 2 T!WWck222i+++3 3 3 3 3A 3 3 3 QUUWWc*****r   c                     t           j        d             }|                     |j                   d }|                     t          |d                     d S )Nc                     d S r	   r
   r   s    r   r   zEtest_factory.<locals>.TestABC.test_abstractmethod_basics.<locals>.fooX   r   r   c                     d S r	   r
   r   s    r   r   zEtest_factory.<locals>.TestABC.test_abstractmethod_basics.<locals>.bar[   r   r   r   )r   rh   r.   r   r/   r0   )r   r   r   s      r   test_abstractmethod_basicsz8test_factory.<locals>.TestABC.test_abstractmethod_basicsW   s\      OOC4555WS*@AABBBBBr   c                    t           t          j        d                         }|                     |j                   d }|                     t          |dd                      G d d          |                     t                      G fdd	          }| 	                     |            j
        d
           d S )Nc                     d S r	   r
   r   s    r   r   zGtest_factory.<locals>.TestABC.test_abstractproperty_basics.<locals>.foo_   s    4r   c                     d S r	   r
   r   s    r   r   zGtest_factory.<locals>.TestABC.test_abstractproperty_basics.<locals>.barc   r   r   r   Fc                   >    e Zd Zeej        d                         ZdS )Etest_factory.<locals>.TestABC.test_abstractproperty_basics.<locals>.Cc                     dS r   r
   r   s    r   r   zItest_factory.<locals>.TestABC.test_abstractproperty_basics.<locals>.C.foog       &'ar   N)r   r   r   r*   r   rh   r   r
   r   r   r   ry   f   s1        #'' $# '''r   r   r    c                   D     e Zd Zj        j         fd            Z xZS )Etest_factory.<locals>.TestABC.test_abstractproperty_basics.<locals>.Dc                 *    t                      j        S r	   r%   r'   s    r   r   zItest_factory.<locals>.TestABC.test_abstractproperty_basics.<locals>.D.fool   r)   r   r   r   r   r   getterr+   r(   r   s   @r   r-   r}   k   5        1111 11111r   r-   r   )r*   r   rh   r.   r   r/   r4   r1   r2   r3   r   )r   r   r   r-   r   r6   s       @r   r7   z:test_factory.<locals>.TestABC.test_abstractproperty_basics^   s      XOOC4555WS*@%HHIII( ( ( ( (k ( ( ( ( i+++2 2 2 2 2 2 2A 2 2 2 QQSSWa(((((r   c                    t           t          j        d                         }|                     |j                   t           d             }|                     t          |dd                      G d d          }|                     t          |            G d d	|          }| 	                    |
                                d	           | 	                     |            
                                d	           d S )
Nc                     d S r	   r
   r:   s    r   r   zJtest_factory.<locals>.TestABC.test_abstractclassmethod_basics.<locals>.fooq   s    $r   c                     d S r	   r
   r:   s    r   r   zJtest_factory.<locals>.TestABC.test_abstractclassmethod_basics.<locals>.baru   r<   r   r   Fc                   >    e Zd Zeej        d                         ZdS )Htest_factory.<locals>.TestABC.test_abstractclassmethod_basics.<locals>.Cc                     | j         S r	   rA   r:   s    r   r   zLtest_factory.<locals>.TestABC.test_abstractclassmethod_basics.<locals>.C.fooz   rf   r   Nrg   r
   r   r   r   r   y   ri   r   r   r    c                   .     e Zd Ze fd            Z xZS )Htest_factory.<locals>.TestABC.test_abstractclassmethod_basics.<locals>.Dc                 D    t                                                      S r	   r%   rF   s    r   r   zLtest_factory.<locals>.TestABC.test_abstractclassmethod_basics.<locals>.D.foo   rG   r   rH   r,   s   @r   r-   r   ~   rJ   r   r-   )rI   r   rh   r.   r   r/   r4   r1   r2   r3   r   r5   s        r   rK   z=test_factory.<locals>.TestABC.test_abstractclassmethod_basicsp   s(      [OOC4555 [WS*@%HHIII2 2 2 2 2k 2 2 2 2 i+++3 3 3 3 3A 3 3 3 QUUWWc***QQSSWWYY,,,,,r   c                    t           t          j        d                         }|                     |j                   t           d             }|                     t          |dd                      G d d          }|                     t          |            G d d	|          }| 	                    |
                                d
           | 	                     |            
                                d
           d S )Nc                      d S r	   r
   r
   r   r   r   zKtest_factory.<locals>.TestABC.test_abstractstaticmethod_basics.<locals>.foo   s    tr   c                      d S r	   r
   r
   r   r   r   zKtest_factory.<locals>.TestABC.test_abstractstaticmethod_basics.<locals>.bar   rN   r   r   Fc                   >    e Zd Zeej        d                         ZdS )Itest_factory.<locals>.TestABC.test_abstractstaticmethod_basics.<locals>.Cc                      dS r   r
   r
   r   r   r   zMtest_factory.<locals>.TestABC.test_abstractstaticmethod_basics.<locals>.C.foo   s    "#!r   N)r   r   r   r[   r   rh   r   r
   r   r   r   r      s1        ### $# ###r   r   r    c                   $    e Zd Zed             ZdS )Itest_factory.<locals>.TestABC.test_abstractstaticmethod_basics.<locals>.Dc                      dS rX   r
   r
   r   r   r   zMtest_factory.<locals>.TestABC.test_abstractstaticmethod_basics.<locals>.D.foo   rS   r   NrZ   r
   r   r   r-   r      r\   r   r-   rY   )r[   r   rh   r.   r   r/   r4   r1   r2   r3   r   r5   s        r   r]   z>test_factory.<locals>.TestABC.test_abstractstaticmethod_basics   s&   O   \OOC4555O \WS*@%HHIII$ $ $ $ $k $ $ $ $ i+++$ $ $ $ $A $ $ $ QUUWWa(((QQSSWWYY*****r   c                 b     G d d          }d}|                      t          ||           d S )Nc                   .    e Zd Zej        d             ZdS )Ptest_factory.<locals>.TestABC.test_object_new_with_one_abstractmethod.<locals>.Cc                     d S r	   r
   r   s    r   
method_onez[test_factory.<locals>.TestABC.test_object_new_with_one_abstractmethod.<locals>.C.method_one       Dr   N)r   r   r   r   rh   r   r
   r   r   r   r      1        #  $#  r   r   r    z'class C with abstract method method_oneassertRaisesRegexr2   r   r   msgr6   s      r   'test_object_new_with_one_abstractmethodzEtest_factory.<locals>.TestABC.test_object_new_with_one_abstractmethod   sW        k     =C""9c155555r   c                 b     G d d          }d}|                      t          ||           d S )Nc                   N    e Zd Zej        d             Zej        d             ZdS )Rtest_factory.<locals>.TestABC.test_object_new_with_many_abstractmethods.<locals>.Cc                     d S r	   r
   r   s    r   r   z]test_factory.<locals>.TestABC.test_object_new_with_many_abstractmethods.<locals>.C.method_one   r   r   c                     d S r	   r
   r   s    r   
method_twoz]test_factory.<locals>.TestABC.test_object_new_with_many_abstractmethods.<locals>.C.method_two   r   r   N)r   r   r   r   rh   r   r   r
   r   r   r   r      sN        #  $##  $#  r   r   r    z4class C with abstract methods method_one, method_twor   r   s      r   )test_object_new_with_many_abstractmethodszGtest_factory.<locals>.TestABC.test_object_new_with_many_abstractmethods   sX        k     JC""9c155555r   c                    t           j        t           j        t           j        t           j        fD ] G fdd          }|                     |j        dh           |                     t          |           | 	                    t          |                      G d d|          }|                     |j        dh           |                     t          |           | 	                    t          |                      G d d|          }|                     |j        t                                  |             |                     t          |                      G fd	d
|          }|                     |j        dh           |                     t          |           | 	                    t          |                     d S )Nc                   ,    e Zd Z d             Zd ZdS )Htest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.Cc                     d S r	   r
   r   s    r   r   zLtest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.C.foo       #'4r   c                     d S r	   r
   r   s    r   r   zLtest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.C.bar   r   r   N)r   r   r   r   r   abstractthings   r   r   r      s-        "'' #]''''''r   r   r    r   c                       e Zd Zd ZdS )Htest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.Dc                     d S r	   r
   r   s    r   r   zLtest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.D.bar   r   r   Nr   r   r   r   r
   r   r   r-   r              '''''r   r-   c                       e Zd Zd ZdS )Htest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.Ec                     d S r	   r
   r   s    r   r   zLtest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.E.foo   r   r   Nr   r   r   r   r
   r   r   Er      r   r   r   c                   &    e Zd Z d             ZdS )Htest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.Fc                     d S r	   r
   r   s    r   r   zLtest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.F.bar   r   r   Nr   r   s   r   Fr      s$        "'' #]'''r   r   r   )r   rh   r   rB   rT   r3   __abstractmethods__r1   r2   r.   r   setr/   )r   r   r-   r   r   r   r6   s        @r   test_abstractmethod_integrationz=test_factory.<locals>.TestABC.test_abstractmethod_integration   s   "%"4c6J"%"9"%":"< / /( ( ( ( ( ( (+ ( ( ( (   !6@@@!!)Q///
1...( ( ( ( ( ( ( (  !6@@@!!)Q///
1...( ( ( ( ( ( ( (  !6>>>  A///( ( ( ( ( ( ( ( ( (   !6@@@!!)Q///
1....3/ /r   c                     G d d          |                      t                      G fdd          |                      t                      G fdd          }|                      |            j        d            G d	 d
t                    |                      t
                    5   G fdd          }d d d            d S # 1 swxY w Y   d S )Nc                   x    e Zd Zeej        d                         Zej        ej        d                         ZdS )Mtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.Cc                     dS r   r
   r   s    r   r   zQtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.C.foo   r{   r   c                     d S r	   r
   r   vals     r   r   zQtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.C.foo       $(Dr   N)r   r   r   r*   r   rh   r   setterr
   r   r   r   r      sT        #'' $# '#(( $# (((r   r   r    c                   D     e Zd Zj        j         fd            Z xZS )Mtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.Dc                 *    t                      j        S r	   r%   r'   s    r   r   zQtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.D.foo   r)   r   r   r   s   @r   r-   r      r   r   r-   c                   :    e Zd Z j        j        d             ZdS )Mtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.Ec                     d S r	   r
   r   s     r   r   zQtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.E.foo       $(Dr   Nr   r   r   r   r   r-   s   r   r   r      (        (( (((r   r   r   c                       e Zd Zd ZeZdS )Stest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.NotBoolc                     t                      r	   )
ValueErrorr   s    r   __bool__z\test_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.NotBool.__bool__   s    $,,&r   N)r   r   r   r   __len__r
   r   r   NotBoolr      s"        ' ' '"r   r   c                   J    e Zd Zd Z              e_         ee          ZdS )Mtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.Fc                     d S r	   r
   r   s    r   r   zQtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.F.bar   s    r   N)r   r   r   r   r   r*   r   )r   s   r   r   r      s9          /6wyyC,"(3--CCCr   r   )r1   r2   r3   r   objectr   )r   r   r   r   r-   r   r6   s      @@@r   $test_descriptors_with_abstractmethodzBtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod   s   ) ) ) ) )k ) ) ) ) i+++2 2 2 2 2 2 2A 2 2 2 i+++) ) ) ) ) ) )A ) ) ) QQSSWa(((# # # # #& # # # "":.. ( (( ( ( ( ( ( ( ( ( (( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (s   :CCCc                 8    G fdd           G fdd          |                      t                      G fdd          |                      t                      G fdd	          }|                     |j        j                   d S )
Nc                   B    e Zd ZddZ fdZ fdZed             ZdS )\test_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.DescriptorNc                 "    || _         || _        d S r	   )_fget_fset)r   fgetfsets      r   __init__zetest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.Descriptor.__init__   s    !%DJ!%DJJJr   c                 &     || j                   S r	   r   r   callable
Descriptors     r   r   zctest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.Descriptor.getter   s    %:h
;;;r   c                 &     | j         |          S r	   r   r   s     r   r   zctest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.Descriptor.setter   s    %:dj(;;;r   c                 Z    t          | j        dd          pt          | j        dd          S )Nr   F)r4   r   r   r   s    r   r   zqtest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.Descriptor.__isabstractmethod__   s2    #DJ0FNN R&tz3I5QQSr   r	   )r   r   r   r   r   r   r*   r   r   s   r   r   r      sy        & & & &< < < < << < < < <S S S S Sr   r   c                   z    e Zd Z ej        d                         Zej        ej        d                         ZdS )Stest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.Cc                     dS r   r
   r   s    r   r   zWtest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.C.foo   r{   r   c                     d S r	   r
   r   s     r   r   zWtest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.C.foo   r   r   N)r   r   r   r   rh   r   r   r   s   r   r   r      sU        #'' $# '#(( $# (((r   r   r    c                   D     e Zd Zj        j         fd            Z xZS )Stest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.Dc                 *    t                      j        S r	   r%   r'   s    r   r   zWtest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.D.foo   r)   r   r   r   s   @r   r-   r      r   r   r-   c                   :    e Zd Z j        j        d             ZdS )Stest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.Ec                     d S r	   r
   r   s     r   r   zWtest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.E.foo   r   r   Nr   r   s   r   r   r      r   r   r   )r1   r2   r/   r   r   )r   r   r   r-   r   r6   s     @@@r   *test_customdescriptors_with_abstractmethodzHtest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod   s4   S S S S S S S S S S) ) ) ) ) ) )k ) ) ) ) i+++2 2 2 2 2 2 2A 2 2 2 i+++) ) ) ) ) ) )A ) ) ) QU788888r   c                      G d d          }|                      |j        dh            G d dt          |          } G d d|          }d S )	Nc                   .    e Zd Zej        d             ZdS );test_factory.<locals>.TestABC.test_metaclass_abc.<locals>.Ac                     d S r	   r
   r   s    r   xz=test_factory.<locals>.TestABC.test_metaclass_abc.<locals>.A.x  r   r   N)r   r   r   r   rh   r   r
   r   r   Ar     r   r   r  r    r   c                       e Zd Zd ZdS )>test_factory.<locals>.TestABC.test_metaclass_abc.<locals>.metac                     dS N   r
   r   s    r   r   z@test_factory.<locals>.TestABC.test_metaclass_abc.<locals>.meta.x  s    1r   N)r   r   r   r   r
   r   r   metar    s#            r   r  c                       e Zd ZdS );test_factory.<locals>.TestABC.test_metaclass_abc.<locals>.CNr   r   r   r
   r   r   r   r	            r   r   )r3   r   rn   )r   r  r  r   r6   s       r   test_metaclass_abcz0test_factory.<locals>.TestABC.test_metaclass_abc  s        k     Q2SE:::    tQ       d      r   c                     G d d          } G d dt                     } |            }|                     t          ||                     |                     t          ||f                     |                     ||           |                     ||f           |                    |          }|                     t          ||                     |                     t          ||f                     |                     ||           |                     ||f           |                     ||            G d d|          } |            }|                     t          ||                     |                     t          ||f                     |                     ||           |                     ||f           d S )Nc                       e Zd ZdS )Atest_factory.<locals>.TestABC.test_registration_basics.<locals>.ANr
  r
   r   r   r  r    r  r   r  r    c                       e Zd ZdS )Atest_factory.<locals>.TestABC.test_registration_basics.<locals>.BNr
  r
   r   r   Br    r  r   r  c                       e Zd ZdS )Atest_factory.<locals>.TestABC.test_registration_basics.<locals>.CNr
  r
   r   r   r   r  !  r  r   r   )r   r/   
issubclassassertNotIsInstanceregisterr.   assertIsInstanceassertIs)r   r  r  bB1r   cr6   s          r   test_registration_basicsz6test_factory.<locals>.TestABC.test_registration_basics  s       k        F   AZ1--...ZA400111$$Q***$$Q---ABOOJq!,,---OOJq1$//000!!!Q'''!!!aT***MM"a       A   AOOJq!,,---OOJq1$//000!!!Q'''!!!aT*****r   c                     G d d          }|j          G d dt                                } |            }|                     t          ||                     |                     t          ||f                     |                     ||           |                     ||f           |j          G d d|                      } |            }|                     t          ||                     |                     t          ||f                     |                     ||           |                     ||f           |                     ||                     |                     d S )Nc                       e Zd ZdS )Dtest_factory.<locals>.TestABC.test_register_as_class_deco.<locals>.ANr
  r
   r   r   r  r   *  r  r   r  r    c                       e Zd ZdS )Dtest_factory.<locals>.TestABC.test_register_as_class_deco.<locals>.BNr
  r
   r   r   r  r"  ,          r   r  c                       e Zd ZdS )Dtest_factory.<locals>.TestABC.test_register_as_class_deco.<locals>.CNr
  r
   r   r   r   r%  4  r#  r   r   )r  r   r.   r  r  r  )r   r  r  r  r   r  r6   s         r   test_register_as_class_decoz9test_factory.<locals>.TestABC.test_register_as_class_deco)  s       k    Z    F   ZAOOJq!,,---OOJq1$//000!!!Q'''!!!aT***Z    A   ZAOOJq!,,---OOJq1$//000!!!Q'''!!!aT***MM!QZZ]]+++++r   c                     G d d          } G d d          } |            }|                      t          ||                     |                      t          ||f                                  }|                    |                        }|                     ||           |                     t          ||                     |                     t          ||f                     d S )Nc                       e Zd ZdS )Etest_factory.<locals>.TestABC.test_isinstance_invalidation.<locals>.ANr
  r
   r   r   r  r)  ?  r  r   r  r    c                       e Zd ZdS )Etest_factory.<locals>.TestABC.test_isinstance_invalidation.<locals>.BNr
  r
   r   r   r  r+  A  r  r   r  )r/   
isinstancer  assertGreaterr.   )r   r  r  r  	token_old	token_newr6   abc_get_cache_tokens         r   test_isinstance_invalidationz:test_factory.<locals>.TestABC.test_isinstance_invalidation>  s$       k           AZ1--...ZA400111++--IJJqMMM++--Iy)444OOJq!,,---OOJq1$//00000r   c                 V    G d d          }|                     t                     |                     d|           |                     d|f           |                     t	          t          |                     |                     t	          t          |f                      G d d|          }|                     t
                      G d dt
                    }|                     d	|           |                     d	|f           |                     t	          t
          |                     |                     t	          t
          |f                     |                     t	          ||                     |                     t	          ||f                     d S )
Nc                       e Zd ZdS )Ctest_factory.<locals>.TestABC.test_registration_builtins.<locals>.ANr
  r
   r   r   r  r4  N  r  r   r  r    *   c                       e Zd ZdS )Ctest_factory.<locals>.TestABC.test_registration_builtins.<locals>.BNr
  r
   r   r   r  r7  U  r  r   r  c                       e Zd ZdS )Ctest_factory.<locals>.TestABC.test_registration_builtins.<locals>.CNr
  r
   r   r   r   r9  X            r   r    )r  intr  r.   r  strr   r  r  r   r6   s       r   test_registration_builtinsz8test_factory.<locals>.TestABC.test_registration_builtinsM  s       k    JJsOOO!!"a(((!!"qd+++OOJsA..///OOJsQD11222    A   JJsOOOC!!"a(((!!"qd+++OOJsA..///OOJsQD11222OOJq!,,---OOJq1$//00000r   c                     G d d          }|                     |            G d d|          }|                     t          |j         |            G d dt                    }|                     |           |                     |            G d d	|          }|                     |           |                     t          |j         |           |                     |           d S )
Nc                       e Zd ZdS )Etest_factory.<locals>.TestABC.test_registration_edge_cases.<locals>.ANr
  r
   r   r   r  rB  a  r  r   r  r    c                       e Zd ZdS )Ftest_factory.<locals>.TestABC.test_registration_edge_cases.<locals>.A1Nr
  r
   r   r   A1rD  d  r  r   rE  c                       e Zd ZdS )Etest_factory.<locals>.TestABC.test_registration_edge_cases.<locals>.BNr
  r
   r   r   r  rG  g  r  r   r  c                       e Zd ZdS )Etest_factory.<locals>.TestABC.test_registration_edge_cases.<locals>.CNr
  r
   r   r   r   rI  k  r  r   r   )r  r1   RuntimeErrorr   )r   r  rE  r  r   r6   s        r   test_registration_edge_casesz:test_factory.<locals>.TestABC.test_registration_edge_cases`  s3       k    JJqMMM    Q   lBK;;;    F   KKNNNKKNNN    A   JJqMMMlAJ:::JJqMMMMMr   c                 j     G d d          }|                      t          d|j        d           d S )Nc                       e Zd ZdS )@test_factory.<locals>.TestABC.test_register_non_class.<locals>.ANr
  r
   r   r   r  rN  r  r  r   r  r    zCan only register classesrY   )r   r2   r  r   r  r6   s     r   test_register_non_classz5test_factory.<locals>.TestABC.test_register_non_classq  s`        k    ""9.I#$:q2 2 2 2 2r   c                 .    G d d          }|                      t          ||                     |                      t          ||f                      G d d          }|                     t          ||                     |                     t          ||f                     |                     t          ||                     |                     t          ||f                      G d d          }|                    |            G d d	|          }|                      t          ||                     |                      t          ||f                      G d
 d|          }|                    |           |                     t          ||                     |                     t          ||f                     |                     t          ||                     |                     t          ||f                     |                      t          ||                     |                      t          ||f                     |                      t          ||                     |                      t          ||f                     |                      t          ||                     |                      t          ||f                     |                    t                      G d dt                    }|                      t          ||                     |                      t          ||f                     |                     d|           |                     d|f           d S )Nc                       e Zd ZdS )Itest_factory.<locals>.TestABC.test_registration_transitiveness.<locals>.ANr
  r
   r   r   r  rS  x  r  r   r  r    c                       e Zd ZdS )Itest_factory.<locals>.TestABC.test_registration_transitiveness.<locals>.BNr
  r
   r   r   r  rU  |  r  r   r  c                       e Zd ZdS )Itest_factory.<locals>.TestABC.test_registration_transitiveness.<locals>.CNr
  r
   r   r   r   rW    r  r   r   c                       e Zd ZdS )Jtest_factory.<locals>.TestABC.test_registration_transitiveness.<locals>.B1Nr
  r
   r   r   r  rY    r  r   r  c                       e Zd ZdS )Jtest_factory.<locals>.TestABC.test_registration_transitiveness.<locals>.C1Nr
  r
   r   r   C1r[    r  r   r\  c                       e Zd ZdS )Mtest_factory.<locals>.TestABC.test_registration_transitiveness.<locals>.MyIntNr
  r
   r   r   MyIntr^    r  r   r_  r5  )r.   r  r/   r  r<  r  )r   r  r  r   r  r\  r_  r6   s          r    test_registration_transitivenessz>test_factory.<locals>.TestABC.test_registration_transitivenessw  s       k    OOJq!,,---OOJq1$//000    k    Z1--...ZA400111Z1--...ZA400111    k    JJqMMM    Q   OOJr1--...OOJrA400111    Q   KKOOOZ1--...ZA400111Z2..///ZB511222OOJr1--...OOJrA400111OOJr1--...OOJrA400111OOJr2..///OOJrB511222KK       OOJua00111OOJuqd33444!!"a(((!!"qd+++++r   c                   	  G d d
          }|                      t                    5  t          i |           d d d            n# 1 swxY w Y   |                      t                    5  t          d|           d d d            n# 1 swxY w Y    G d d          }|                      t                    5  t           |            |           d d d            n# 1 swxY w Y   d d d d	 g}t          |          D ]\  } G fd
d
          }|                     |          5  |                      t                    5  t          t
          |           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y    G d dt                    dfd	 G 	fdd
          }|                               5  t          t
          |           d d d            d S # 1 swxY w Y   d S )Nc                       e Zd ZdS )Ftest_factory.<locals>.TestABC.test_issubclass_bad_arguments.<locals>.ANr
  r
   r   r   r  rc    r  r   r  r    r5  c                       e Zd ZdZdS )Ftest_factory.<locals>.TestABC.test_issubclass_bad_arguments.<locals>.Cr5  N)r   r   r   __mro__r
   r   r   r   re    s        r   r   c                     g S r	   r
   )r   s    r   <lambda>zMtest_factory.<locals>.TestABC.test_issubclass_bad_arguments.<locals>.<lambda>  s    " r   c                      dS Nr5  r
   r
   r   r   rh  zMtest_factory.<locals>.TestABC.test_issubclass_bad_arguments.<locals>.<lambda>  s     r   c                      dgS rj  r
   r
   r   r   rh  zMtest_factory.<locals>.TestABC.test_issubclass_bad_arguments.<locals>.<lambda>  s     r   c                       e Zd Z ZdS Ftest_factory.<locals>.TestABC.test_issubclass_bad_arguments.<locals>.SNr   r   r   __subclasses__)funcs   r   Srn    s        %)NNNr   rr  )ic                       e Zd ZdS )Ptest_factory.<locals>.TestABC.test_issubclass_bad_arguments.<locals>.CustomErrorNr
  r
   r   r   CustomErrorru    r:  r   rv  zexception from __subclasses__c                                  r	   r
   )rv  exc_msgs   r   	raise_exczNtest_factory.<locals>.TestABC.test_issubclass_bad_arguments.<locals>.raise_exc  s    !k'***r   c                       e Zd Z ZdS rm  ro  )ry  s   r   rr  zFtest_factory.<locals>.TestABC.test_issubclass_bad_arguments.<locals>.S  s        !*r   )r1   r2   r  	enumeratesubTestr<  	Exceptionr   )r   r  r   bogus_subclassesrs  rr  rv  rx  rq  ry  r6   s         @@@@r   test_issubclass_bad_argumentsz;test_factory.<locals>.TestABC.test_issubclass_bad_arguments  s1       k     ""9-- " "2q!!!" " " " " " " " " " " " " " " ""9-- " "2q!!!" " " " " " " " " " " " " " "
        ""9-- # #1133"""# # # # # # # # # # # # # # # 
	  %%566 + +4* * * * * * *+ * * * * \\A\&& + +**955 + +"3***+ + + + + + + + + + + + + + ++ + + + + + + + + + + + + + + .----i---5G+ + + + + ++ + + + + + +k + + + + ''W== # #3"""# # # # # # # # # # # # # # # # # #s}   AAA1BBB C%%C),C)4FE1%F1E55F8E59FF	F	G99G= G=c                     G fddt           j                  |                     t                               |                     t          f                      G d d          }|                     t          |                     |                     t          |f                      G d d          }|                     t          |                     |                     t          |f                     d S )Nc                   *    e Zd Ze fd            ZdS ):test_factory.<locals>.TestABC.test_subclasshook.<locals>.Ac                 ,    | u r	d|j         v S t          S )Nr   )__dict__NotImplemented)r;   r   r  s     r   __subclasshook__zKtest_factory.<locals>.TestABC.test_subclasshook.<locals>.A.__subclasshook__  s    axx$
22))r   N)r   r   r   rI   r  )r  s   r   r  r    s8        * * * * * * *r   r  r    c                       e Zd ZdZdS ):test_factory.<locals>.TestABC.test_subclasshook.<locals>.Br5  Nr   r
   r   r   r  r    s        r   r  c                       e Zd ZdZdS ):test_factory.<locals>.TestABC.test_subclasshook.<locals>.Cr5  N)r   r   r   spamr
   r   r   r   r    s        r   r   )r   ro   r/   r  r.   )r   r  r   r  s      @r   test_subclasshookz/test_factory.<locals>.TestABC.test_subclasshook  sL   * * * * * * *ck * * * * Z1--...ZA400111       OOJq!,,---OOJq1$//000       Z1--...ZA40011111r   c                      G d d          } G fddt                      G d d|          }|                     j        d            |             |                     j        d	           d S )
Nc                       e Zd ZdS )Htest_factory.<locals>.TestABC.test_all_new_methods_are_called.<locals>.ANr
  r
   r   r   r  r    r  r   r  r    c                   &     e Zd ZdZ fdZ xZS )Htest_factory.<locals>.TestABC.test_all_new_methods_are_called.<locals>.Br   c                 f    xj         dz  c_         t                                          |           S r  )counterr&   __new__)r;   r  r(   s    r   r  zPtest_factory.<locals>.TestABC.test_all_new_methods_are_called.<locals>.B.__new__  s(    IINII 77??3///r   )r   r   r   r  r  r+   )r(   r  s   @r   r  r    sC        0 0 0 0 0 0 0 0 0 0r   r  c                       e Zd ZdS )Htest_factory.<locals>.TestABC.test_all_new_methods_are_called.<locals>.CNr
  r
   r   r   r   r    r  r   r   r   r  )r   r3   r  )r   r  r   r  r6   s      @r   test_all_new_methods_are_calledz=test_factory.<locals>.TestABC.test_all_new_methods_are_called  s        k    0 0 0 0 0 0 0F 0 0 0
    Aq   QY***ACCCQY*****r   c                 `    |                      t          t          j        d                     d S )N	__slots__)r.   r0   r   rm   r   s    r   test_ABC_has___slots__z4test_factory.<locals>.TestABC.test_ABC_has___slots__  s&    OOGCG[99:::::r   c           	          d } G d d          } G d d          } G d d |||                    }|                      |j                   d S )Nc                 l      G  fddt                     }t                               |ddi           S )Nc                       e Zd Z fdZdS )^test_factory.<locals>.TestABC.test_tricky_new_works.<locals>.with_metaclass.<locals>.metaclassc                      ||          S r	   r
   )r;   name
this_basesdbasesr  s       r   r  zftest_factory.<locals>.TestABC.test_tricky_new_works.<locals>.with_metaclass.<locals>.metaclass.__new__  s    #tD%333r   N)r   r   r   r  )r  r  s   r   r!   r    s3        4 4 4 4 4 4 4 4r   r!   temporary_classr
   )rn   r  )r  r  r!   s   `` r   with_metaclasszKtest_factory.<locals>.TestABC.test_tricky_new_works.<locals>.with_metaclass  sX    4 4 4 4 4 4 4 4 4 4 4 ||I/@"bIIIr   c                       e Zd ZdS )>test_factory.<locals>.TestABC.test_tricky_new_works.<locals>.ANr
  r
   r   r   r  r    r:  r   r  c                       e Zd ZdS )>test_factory.<locals>.TestABC.test_tricky_new_works.<locals>.BNr
  r
   r   r   r  r    r:  r   r  c                       e Zd ZdS )>test_factory.<locals>.TestABC.test_tricky_new_works.<locals>.CNr
  r
   r   r   r   r    r  r   r   )r3   r(   )r   r  r  r  r   r6   s        r   test_tricky_new_worksz3test_factory.<locals>.TestABC.test_tricky_new_works  s    J J J
 LLLLLLLLLLLLLL    NN;155   Q[+66666r   c                 2    G d d          }|` |                     |j        dh           |                     t	          |d                     t          j        |           |                     |j        t                                  |             d S )Nc                   .    e Zd Zej        d             ZdS )8test_factory.<locals>.TestABC.test_update_del.<locals>.Ac                     d S r	   r
   r   s    r   r   z<test_factory.<locals>.TestABC.test_update_del.<locals>.A.foo   r   r   Nr   r   r   r   rh   r   r
   r   r   r  r    r   r   r  r    r   )r   r3   r   r/   r0   r   update_abstractmethodsr   rO  s     r   test_update_delz-test_factory.<locals>.TestABC.test_update_del  s        k    
 Q2UG<<<WQ..///&q)))Q2CEE:::ACCCCCr   c                      G d d          }t           j        d             }||_        t          j        |           |                     |j        ddh           d}|                     t          ||           d S )Nc                   .    e Zd Zej        d             ZdS )Htest_factory.<locals>.TestABC.test_update_new_abstractmethods.<locals>.Ac                     d S r	   r
   r   s    r   r   zLtest_factory.<locals>.TestABC.test_update_new_abstractmethods.<locals>.A.bar  r   r   N)r   r   r   r   rh   r   r
   r   r   r  r    r   r   r  r    c                     d S r	   r
   r   s    r   updated_foozRtest_factory.<locals>.TestABC.test_update_new_abstractmethods.<locals>.updated_foo      r   r   r   z&class A with abstract methods bar, foo)r   rh   r   r  r3   r   r   r2   )r   r  r  r   r6   s       r   test_update_new_abstractmethodsz=test_factory.<locals>.TestABC.test_update_new_abstractmethods  s        k    
      AE&q)))Q2UENCCC:C""9c155555r   c                 P    G d d          } G d d|          }d}|                      t          ||           |                     |j        dh           d |_        t          j        |            |             |                     |j        t                                 d S )	Nc                   .    e Zd Zej        d             ZdS )Ctest_factory.<locals>.TestABC.test_update_implementation.<locals>.Ac                     d S r	   r
   r   s    r   r   zGtest_factory.<locals>.TestABC.test_update_implementation.<locals>.A.foo   r   r   Nr  r
   r   r   r  r    r   r   r  r    c                       e Zd ZdS )Ctest_factory.<locals>.TestABC.test_update_implementation.<locals>.BNr
  r
   r   r   r  r  $  r  r   r   class B with abstract method foor   c                     d S r	   r
   r   s    r   rh  zJtest_factory.<locals>.TestABC.test_update_implementation.<locals>.<lambda>+  s     r   )r   r2   r3   r   r   r   r  r   r   r  r  r   r6   s       r   test_update_implementationz8test_factory.<locals>.TestABC.test_update_implementation  s        k    
    A    5C""9c1555Q2UG<<<%%AE&q)))ACCCQ2CEE:::::r   c                      G d d          }d }t           j        | G d d|                                  } |             |                     |j        t	                                 d S )Nc                   .    e Zd Zej        d             ZdS )Atest_factory.<locals>.TestABC.test_update_as_decorator.<locals>.Ac                     d S r	   r
   r   s    r   r   zEtest_factory.<locals>.TestABC.test_update_as_decorator.<locals>.A.foo4  r   r   Nr  r
   r   r   r  r  3  r   r   r  r    c                     d | _         | S )Nc                     d S r	   r
   r   s    r   rh  zatest_factory.<locals>.TestABC.test_update_as_decorator.<locals>.class_decorator.<locals>.<lambda>9  s    t r   )r   r:   s    r   class_decoratorzOtest_factory.<locals>.TestABC.test_update_as_decorator.<locals>.class_decorator8  s    ++
r   c                       e Zd ZdS )Atest_factory.<locals>.TestABC.test_update_as_decorator.<locals>.BNr
  r
   r   r   r  r  <  s         r   r  )r   r  r3   r   r   )r   r  r  r  r6   s       r   test_update_as_decoratorz6test_factory.<locals>.TestABC.test_update_as_decorator2  s        k    
   '    A   _ (' ACCCQ2CEE:::::r   c                      G d d          }t           j        d             }||_        t          j        |            |             |                     t          |d                     d S )Nc                       e Zd ZdS )<test_factory.<locals>.TestABC.test_update_non_abc.<locals>.ANr
  r
   r   r   r  r  E  r  r   r  c                     d S r	   r
   r   s    r   r  zFtest_factory.<locals>.TestABC.test_update_non_abc.<locals>.updated_fooH  r  r   r   )r   rh   r   r  r/   r0   )r   r  r  s      r   test_update_non_abcz1test_factory.<locals>.TestABC.test_update_non_abcD  s                 AE&q)))ACCCWQ(=>>?????r   c                      G d d          } G d d|          } |             |` t          j        |           d}|                     t          ||           d S )Nc                   .    e Zd Zej        d             ZdS )Gtest_factory.<locals>.TestABC.test_update_del_implementation.<locals>.Ac                     d S r	   r
   r   s    r   r   zKtest_factory.<locals>.TestABC.test_update_del_implementation.<locals>.A.fooS  r   r   Nr  r
   r   r   r  r  R  r   r   r  r    c                       e Zd Zd ZdS )Gtest_factory.<locals>.TestABC.test_update_del_implementation.<locals>.Bc                     d S r	   r
   r   s    r   r   zKtest_factory.<locals>.TestABC.test_update_del_implementation.<locals>.B.fooX      Dr   Nr   r
   r   r   r  r  W  #            r   r  r  r   r   r  r   r2   r  s       r   test_update_del_implementationz<test_factory.<locals>.TestABC.test_update_del_implementationQ  s        k    
    A    ACCC&q)))4C""9c155555r   c                      G d d          } G d d|          } G d d|          } |             |` t          j        |           d}|                     t          ||           d S )	Nc                   .    e Zd Zej        d             ZdS )Ktest_factory.<locals>.TestABC.test_update_layered_implementation.<locals>.Ac                     d S r	   r
   r   s    r   r   zOtest_factory.<locals>.TestABC.test_update_layered_implementation.<locals>.A.foof  r   r   Nr  r
   r   r   r  r  e  r   r   r  r    c                       e Zd ZdS )Ktest_factory.<locals>.TestABC.test_update_layered_implementation.<locals>.BNr
  r
   r   r   r  r  j  r  r   r  c                       e Zd Zd ZdS )Ktest_factory.<locals>.TestABC.test_update_layered_implementation.<locals>.Cc                     d S r	   r
   r   s    r   r   zOtest_factory.<locals>.TestABC.test_update_layered_implementation.<locals>.C.foon  r  r   Nr   r
   r   r   r   r  m  r  r   r   z class C with abstract method foor  )r   r  r  r   r   r6   s        r   "test_update_layered_implementationz@test_factory.<locals>.TestABC.test_update_layered_implementationd  s        k    
    A       A    ACCC&q)))4C""9c155555r   c                 (    G d d          } G d d          } G d d||          }|                      |j        dh           |`t          j        |           |                      |j        t                                  |             d S )	Nc                   .    e Zd Zej        d             ZdS )Ftest_factory.<locals>.TestABC.test_update_multi_inheritance.<locals>.Ac                     d S r	   r
   r   s    r   r   zJtest_factory.<locals>.TestABC.test_update_multi_inheritance.<locals>.A.foo|  r   r   Nr  r
   r   r   r  r  {  r   r   r  r    c                       e Zd Zd ZdS )Ftest_factory.<locals>.TestABC.test_update_multi_inheritance.<locals>.Bc                     d S r	   r
   r   s    r   r   zJtest_factory.<locals>.TestABC.test_update_multi_inheritance.<locals>.B.foo  r  r   Nr   r
   r   r   r  r    r  r   r  c                   .    e Zd Zej        d             ZdS )Ftest_factory.<locals>.TestABC.test_update_multi_inheritance.<locals>.Cc                     d S r	   r
   r   s    r   r   zJtest_factory.<locals>.TestABC.test_update_multi_inheritance.<locals>.C.foo  r   r   Nr  r
   r   r   r   r    r   r   r   r   )r3   r   r   r   r  r   r>  s       r   test_update_multi_inheritancez;test_factory.<locals>.TestABC.test_update_multi_inheritancez  s        k    
    k        Aq   
 Q2UG<<<&q)))Q2CEE:::ACCCCCr   N)"r   r   r   rp   rt   r7   rK   r]   r   r   r   r   r   r  r  r&  r1  r?  rK  rP  r`  r  r  r  r  r  r  r  r  r  r  r  r  r  )r6   r0  s   r   TestABCra   H   s       	+ 	+ 	+	C 	C 	C	) 	) 	) 	) 	)$	- 	- 	- 	- 	-(	+ 	+ 	+ 	+ 	+(	6 	6 	6 	6 	6		6 		6 		6 		6 		6	/ 	/ 	/ 	/ 	/8	( 	( 	( 	( 	(>	9 	9 	9 	9 	9<	 	 	 	 		+ 	+ 	+ 	+ 	+0	, 	, 	, 	, 	,*	1 	1 	1 	1 	1 	1	1 	1 	1 	1 	1&	 	 	 	 	"	2 	2 	2 	2 	2%	, %	, %	, %	, %	,N/	# /	# /	# /	# /	#b	2 	2 	2$	+ 	+ 	+ 	+ 	+	; 	; 	;
	7 
	7 
	7 
	7 
	7	 	 	 	 	 	6 	6 	6 	6 	6 	; 	; 	; 	; 	;(	; 	; 	; 	; 	;$	@ 	@ 	@	6 	6 	6 	6 	6&	6 	6 	6 	6 	6,	 	 	 	 	 	 	r   r  c                   $    e Zd Z fdZ fdZdS )-test_factory.<locals>.TestABCWithInitSubclassc           	           G d d          }i  G fdd          } G d d||dd	d
          }|                      t          dd	d
                     d S )Nc                       e Zd ZdZdS )\test_factory.<locals>.TestABCWithInitSubclass.test_works_with_init_subclass.<locals>.abc_ABCr
   N)r   r   r   r  r
   r   r   abc_ABCr    s        			r   r  r    c                   "     e Zd Z fdZ xZS )htest_factory.<locals>.TestABCWithInitSubclass.test_works_with_init_subclass.<locals>.ReceivesClassKwargsc                 r    t                                                                           |           d S r	   r&   __init_subclass__updater;   kwargsr(   saved_kwargss     r   r   zztest_factory.<locals>.TestABCWithInitSubclass.test_works_with_init_subclass.<locals>.ReceivesClassKwargs.__init_subclass__  3    GG--/// ''/////r   r   r   r   r   r+   r(   r  s   @r   ReceivesClassKwargsr    >        0 0 0 0 0 0 0 0 0 0r   r  c                       e Zd ZdS )]test_factory.<locals>.TestABCWithInitSubclass.test_works_with_init_subclass.<locals>.ReceiverNr
  r
   r   r   Receiverr    r  r   r  r     r   )r   yzr3   dict)r   r  r  r  r  r6   s       @r   test_works_with_init_subclasszKtest_factory.<locals>.TestABCWithInitSubclass.test_works_with_init_subclass  s        K    L0 0 0 0 0 0 0 0 0 0    .1Q    \4!qA+>+>+>?????r   c                     i  G fdd          } G d d|d          }|                      t          d                     d S )Nc                   "     e Zd Z fdZ xZS )otest_factory.<locals>.TestABCWithInitSubclass.test_positional_only_and_kwonlyargs_with_init_subclass.<locals>.Ac                 r    t                                                                           |           d S r	   r  r  s     r   r   ztest_factory.<locals>.TestABCWithInitSubclass.test_positional_only_and_kwonlyargs_with_init_subclass.<locals>.A.__init_subclass__  r  r   r  r  s   @r   r  r    r	  r   r  c                       e Zd ZdS )otest_factory.<locals>.TestABCWithInitSubclass.test_positional_only_and_kwonlyargs_with_init_subclass.<locals>.BNr
  r
   r   r   r  r    r  r   r  test)r!   r  )r  r  )r   r  r  r  r6   s      @r   6test_positional_only_and_kwonlyargs_with_init_subclasszdtest_factory.<locals>.TestABCWithInitSubclass.test_positional_only_and_kwonlyargs_with_init_subclass  s    L0 0 0 0 0 0 0 0 0 0
    A6    \4V+<+<+<=====r   N)r   r   r   r  r  r^   s   r   TestABCWithInitSubclassr    sL        
	@ 
	@ 
	@ 
	@ 
	@
	> 
	> 
	> 
	> 
	> 
	> 
	>r   r  )unittestTestCase)r6   r0  r_   r  r  s   ``   r   test_factoryr     s    5+ 5+ 5+ 5+ 5+ 5+ 5+) 5+ 5+ 5+pI	 I	 I	 I	 I	 I	 I	 I	(# I	 I	 I	X> > > > > > >("3 > > >2 '#:::r   __main__)__doc__r  r   _py_abcinspectr   r  ro   get_cache_tokenTestLegacyAPI_Py
TestABC_PyTestABCWithInitSubclass_PyTestLegacyAPI_C	TestABC_CTestABCWithInitSubclass_Cr   mainr
   r   r   <module>r+     s       



       ^
; ^
; ^
;@ <H<HKH[<] <] 8 *88DW_ELE\9^ 9^ 55 zHMOOOOO r   