B
    u9a!%  ã               @   sd   d dl Z d dlmZ G dd„ de jƒZG dd„ de jƒZejG dd„ de jƒƒZed	kr`e  	¡  dS )
é    N)Úsupportc               @   sT   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dd„ Z
dd„ ZdS )ÚTestMROEntryc                st   g ‰G dd„ dƒ}G ‡ ‡fdd„dƒ‰ ˆ ƒ }|   ˆg ¡ G dd„ d||ƒ}|   ˆd ||ff¡ |   ˆd i ¡ d S )	Nc               @   s   e Zd ZdS )z0TestMROEntry.test_mro_entry_signature.<locals>.BN)Ú__name__Ú
__module__Ú__qualname__© r   r   ú'/usr/lib/python3.7/test_genericclass.pyÚB   s    r	   c                   s   e Zd Z‡ ‡fdd„ZdS )z0TestMROEntry.test_mro_entry_signature.<locals>.Cc                s   ˆ  ||g¡ ˆ fS )N)Úextend)ÚselfÚargsÚkwargs)ÚCÚtestedr   r   Ú__mro_entries__
   s    z@TestMROEntry.test_mro_entry_signature.<locals>.C.__mro_entries__N)r   r   r   r   r   )r   r   r   r   r   	   s   r   c               @   s   e Zd ZdS )z0TestMROEntry.test_mro_entry_signature.<locals>.DN)r   r   r   r   r   r   r   ÚD   s    r   r   é   )ÚassertEqual)r   r	   Úcr   r   )r   r   r   Útest_mro_entry_signature   s    z%TestMROEntry.test_mro_entry_signaturec                sê   g ‰ G dd„ dƒ}G dd„ dƒ}G ‡ fdd„dƒ}|ƒ }|   ˆ g ¡ G dd„ d|||ƒ}|   ˆ d	 |||f¡ |   |j|||f¡ |   |j|||f¡ |   |j||||tf¡ |ƒ }G d
d„ d|ƒ}|   ˆ d	 |f¡ |   |j|f¡ d S )Nc               @   s   e Zd ZdS )z&TestMROEntry.test_mro_entry.<locals>.AN)r   r   r   r   r   r   r   ÚA   s    r   c               @   s   e Zd ZdS )z&TestMROEntry.test_mro_entry.<locals>.BN)r   r   r   r   r   r   r   r	      s    r	   c                   s   e Zd Z‡ fdd„ZdS )z&TestMROEntry.test_mro_entry.<locals>.Cc                s   ˆ   |¡ | jfS )N)ÚappendÚ	__class__)r   Úbases)r   r   r   r      s    
z6TestMROEntry.test_mro_entry.<locals>.C.__mro_entries__N)r   r   r   r   r   )r   r   r   r      s   r   c               @   s   e Zd ZdS )z&TestMROEntry.test_mro_entry.<locals>.DN)r   r   r   r   r   r   r   r      s    r   éÿÿÿÿc               @   s   e Zd ZdS )z&TestMROEntry.test_mro_entry.<locals>.EN)r   r   r   r   r   r   r   ÚE#   s    r   )r   Ú	__bases__Ú__orig_bases__Ú__mro__Úobject)r   r   r	   r   r   r   Údr   r   )r   r   Útest_mro_entry   s    zTestMROEntry.test_mro_entryc                s  g ‰ G dd„ dƒ}G dd„ dƒ}G ‡ fdd„dƒ}|ƒ }|   ˆ g ¡ G dd„ d|||ƒ}|   ˆ d	 |||f¡ |   |j||f¡ |   |j|||f¡ |   |j|||tf¡ G d
d„ d|ƒ}|   ˆ d	 |f¡ |   |jtf¡ |   |j|f¡ |   |j|tf¡ d S )Nc               @   s   e Zd ZdS )z+TestMROEntry.test_mro_entry_none.<locals>.AN)r   r   r   r   r   r   r   r   )   s    r   c               @   s   e Zd ZdS )z+TestMROEntry.test_mro_entry_none.<locals>.BN)r   r   r   r   r   r   r   r	   *   s    r	   c                   s   e Zd Z‡ fdd„ZdS )z+TestMROEntry.test_mro_entry_none.<locals>.Cc                s   ˆ   |¡ dS )Nr   )r   )r   r   )r   r   r   r   ,   s    
z;TestMROEntry.test_mro_entry_none.<locals>.C.__mro_entries__N)r   r   r   r   r   )r   r   r   r   +   s   r   c               @   s   e Zd ZdS )z+TestMROEntry.test_mro_entry_none.<locals>.DN)r   r   r   r   r   r   r   r   1   s    r   r   c               @   s   e Zd ZdS )z+TestMROEntry.test_mro_entry_none.<locals>.EN)r   r   r   r   r   r   r   r   6   s    r   )r   r   r   r   r   )r   r   r	   r   r   r   r   r   )r   r   Útest_mro_entry_none'   s     z TestMROEntry.test_mro_entry_nonec                sš   g ‰ G dd„ dƒ}G ‡ fdd„dƒ}|ƒ }|   ˆ g ¡ G dd„ d||ƒ}|   ˆ d ||f¡ |   |j|tf¡ |   |j||f¡ |   |j||ttf¡ d S )Nc               @   s   e Zd ZdS )z4TestMROEntry.test_mro_entry_with_builtins.<locals>.AN)r   r   r   r   r   r   r   r   >   s    r   c                   s   e Zd Z‡ fdd„ZdS )z4TestMROEntry.test_mro_entry_with_builtins.<locals>.Cc                s   ˆ   |¡ tfS )N)r   Údict)r   r   )r   r   r   r   @   s    
zDTestMROEntry.test_mro_entry_with_builtins.<locals>.C.__mro_entries__N)r   r   r   r   r   )r   r   r   r   ?   s   r   c               @   s   e Zd ZdS )z4TestMROEntry.test_mro_entry_with_builtins.<locals>.DN)r   r   r   r   r   r   r   r   E   s    r   r   )r   r   r#   r   r   r   )r   r   r   r   r   r   )r   r   Útest_mro_entry_with_builtins<   s    z)TestMROEntry.test_mro_entry_with_builtinsc                sŽ   g ‰G ‡ ‡fdd„dƒ‰ ˆ ƒ }|   ˆg ¡ G dd„ d|tƒ}|   ˆd |tf¡ |   |jˆ tf¡ |   |j|tf¡ |   |j|ˆ ttf¡ d S )Nc                   s   e Zd Z‡ ‡fdd„ZdS )z6TestMROEntry.test_mro_entry_with_builtins_2.<locals>.Cc                s   ˆ  |¡ ˆ fS )N)r   )r   r   )r   r   r   r   r   N   s    
zFTestMROEntry.test_mro_entry_with_builtins_2.<locals>.C.__mro_entries__N)r   r   r   r   r   )r   r   r   r   r   M   s   r   c               @   s   e Zd ZdS )z6TestMROEntry.test_mro_entry_with_builtins_2.<locals>.DN)r   r   r   r   r   r   r   r   S   s    r   r   )r   r#   r   r   r   r   )r   r   r   r   )r   r   r   Útest_mro_entry_with_builtins_2K   s    z+TestMROEntry.test_mro_entry_with_builtins_2c          	   C   sx   G dd„ dƒ}|ƒ }|   t¡ G dd„ d|ƒ}W d Q R X G dd„ dƒ}|ƒ }|   t¡ G dd„ d|ƒ}W d Q R X d S )Nc               @   s   e Zd Zdd„ ZdS )z6TestMROEntry.test_mro_entry_errors.<locals>.C_too_manyc             S   s   dS )Nr   r   )r   r   Z	somethingÚotherr   r   r   r   [   s    zFTestMROEntry.test_mro_entry_errors.<locals>.C_too_many.__mro_entries__N)r   r   r   r   r   r   r   r   Ú
C_too_manyZ   s   r'   c               @   s   e Zd ZdS )z-TestMROEntry.test_mro_entry_errors.<locals>.DN)r   r   r   r   r   r   r   r   _   s    r   c               @   s   e Zd Zdd„ ZdS )z5TestMROEntry.test_mro_entry_errors.<locals>.C_too_fewc             S   s   dS )Nr   r   )r   r   r   r   r   a   s    zETestMROEntry.test_mro_entry_errors.<locals>.C_too_few.__mro_entries__N)r   r   r   r   r   r   r   r   Ú	C_too_few`   s   r(   c               @   s   e Zd ZdS )z-TestMROEntry.test_mro_entry_errors.<locals>.DN)r   r   r   r   r   r   r   r   e   s    )ÚassertRaisesÚ	TypeError)r   r'   r   r   r(   r    r   r   r   Útest_mro_entry_errorsY   s    z"TestMROEntry.test_mro_entry_errorsc          	   C   sx   G dd„ dƒ}|ƒ }|   t¡ G dd„ d|ƒ}W d Q R X G dd„ dƒ}|ƒ }|   t¡ G dd„ d|ƒ}W d Q R X d S )Nc               @   s   e Zd ZdZdS )z<TestMROEntry.test_mro_entry_errors_2.<locals>.C_not_callablez	Surprise!N)r   r   r   r   r   r   r   r   ÚC_not_callableh   s   r,   c               @   s   e Zd ZdS )z/TestMROEntry.test_mro_entry_errors_2.<locals>.DN)r   r   r   r   r   r   r   r   l   s    r   c               @   s   e Zd Zdd„ ZdS )z9TestMROEntry.test_mro_entry_errors_2.<locals>.C_not_tuplec             S   s   t S )N)r   )r   r   r   r   r   n   s    zITestMROEntry.test_mro_entry_errors_2.<locals>.C_not_tuple.__mro_entries__N)r   r   r   r   r   r   r   r   ÚC_not_tuplem   s   r-   c               @   s   e Zd ZdS )z/TestMROEntry.test_mro_entry_errors_2.<locals>.DN)r   r   r   r   r   r   r   r   r   s    )r)   r*   )r   r,   r   r   r-   r   r   r   Útest_mro_entry_errors_2g   s    z$TestMROEntry.test_mro_entry_errors_2c                sÞ   g ‰G ‡fdd„dt ƒ}G dd„ dƒ‰ G ‡ fdd„dƒ}|ƒ }G dd„ d||d	}|  ˆd
 |¡ |  ˆd d¡ |  ˆd ˆ f¡ |  ˆd d d¡ |  |jˆ f¡ |  |j|f¡ |  |j|ˆ tf¡ |  |j|¡ d S )Nc                   s   e Zd Z‡ ‡fdd„Z‡  ZS )z3TestMROEntry.test_mro_entry_metaclass.<locals>.Metac                s$   ˆ  | |||g¡ tƒ  | |||¡S )N)r
   ÚsuperÚ__new__)ÚmclsÚnamer   Úns)r   Ú	meta_argsr   r   r0   w   s    z;TestMROEntry.test_mro_entry_metaclass.<locals>.Meta.__new__)r   r   r   r0   Ú__classcell__r   )r4   )r   r   ÚMetav   s   r6   c               @   s   e Zd ZdS )z0TestMROEntry.test_mro_entry_metaclass.<locals>.AN)r   r   r   r   r   r   r   r   z   s    r   c                   s   e Zd Z‡ fdd„ZdS )z0TestMROEntry.test_mro_entry_metaclass.<locals>.Cc                s   ˆ fS )Nr   )r   r   )r   r   r   r   |   s    z@TestMROEntry.test_mro_entry_metaclass.<locals>.C.__mro_entries__N)r   r   r   r   r   )r   r   r   r   {   s   r   c               @   s   e Zd ZdZdS )z0TestMROEntry.test_mro_entry_metaclass.<locals>.Dr   N)r   r   r   Úxr   r   r   r   r      s   r   )Ú	metaclassr   r   é   é   r7   )Útyper   r   r   r   r   r   )r   r6   r   r   r   r   )r   r4   r   Útest_mro_entry_metaclasst   s    z%TestMROEntry.test_mro_entry_metaclassc          	   C   s>   G dd„ dƒ}|ƒ }|   td¡ td|fi ƒ W d Q R X d S )Nc               @   s   e Zd Zdd„ ZdS )z0TestMROEntry.test_mro_entry_type_call.<locals>.Cc             S   s   dS )Nr   r   )r   r   r   r   r   r      s    z@TestMROEntry.test_mro_entry_type_call.<locals>.C.__mro_entries__N)r   r   r   r   r   r   r   r   r   Œ   s   r   z+MRO entry resolution; use types.new_class()ZBad)ZassertRaisesRegexr*   r;   )r   r   r   r   r   r   Útest_mro_entry_type_callŠ   s
    z%TestMROEntry.test_mro_entry_type_callN)r   r   r   r   r!   r"   r$   r%   r+   r.   r<   r=   r   r   r   r   r      s   r   c               @   sl   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dd„ Z
dd„ Zdd„ Zdd„ Zdd„ ZdS )ÚTestClassGetitemc                sN   g ‰ G ‡ fdd„dƒ}|t tf  |  ˆ d |t tff¡ |  ˆ d i ¡ d S )Nc                   s   e Zd Z‡ fdd„ZdS )z.TestClassGetitem.test_class_getitem.<locals>.Cc                 s   ˆ   | |g¡ d S )N)r
   )r   r   )Úgetitem_argsr   r   Ú__class_getitem__š   s    z@TestClassGetitem.test_class_getitem.<locals>.C.__class_getitem__N)r   r   r   r@   r   )r?   r   r   r   ™   s   r   r   r   )ÚintÚstrr   )r   r   r   )r?   r   Útest_class_getitem—   s
    z#TestClassGetitem.test_class_getitemc             C   s2   G dd„ dƒ}|   |t d¡ |   || d¡ d S )Nc               @   s   e Zd Zdd„ ZdS )z5TestClassGetitem.test_class_getitem_format.<locals>.Cc             S   s   d|j › dS )NzC[ú])r   )ÚclsÚitemr   r   r   r@   £   s    zGTestClassGetitem.test_class_getitem_format.<locals>.C.__class_getitem__N)r   r   r   r@   r   r   r   r   r   ¢   s   r   zC[int]zC[C])r   rA   )r   r   r   r   r   Útest_class_getitem_format¡   s    z*TestClassGetitem.test_class_getitem_formatc             C   sB   G dd„ dƒ}G dd„ d|ƒ}|   |t d¡ |   || d¡ d S )Nc               @   s   e Zd Zdd„ ZdS )z:TestClassGetitem.test_class_getitem_inheritance.<locals>.Cc             S   s   | j › d|j › dS )Nú[rD   )r   )rE   rF   r   r   r   r@   ª   s    zLTestClassGetitem.test_class_getitem_inheritance.<locals>.C.__class_getitem__N)r   r   r   r@   r   r   r   r   r   ©   s   r   c               @   s   e Zd ZdS )z:TestClassGetitem.test_class_getitem_inheritance.<locals>.DN)r   r   r   r   r   r   r   r   ¬   s    r   zD[int]zD[D])r   rA   )r   r   r   r   r   r   Útest_class_getitem_inheritance¨   s    z/TestClassGetitem.test_class_getitem_inheritancec             C   sB   G dd„ dƒ}G dd„ d|ƒ}|   |t d¡ |   || d¡ d S )Nc               @   s   e Zd Zdd„ ZdS )z<TestClassGetitem.test_class_getitem_inheritance_2.<locals>.Cc             S   s   dS )NzShould not see thisr   )rE   rF   r   r   r   r@   ²   s    zNTestClassGetitem.test_class_getitem_inheritance_2.<locals>.C.__class_getitem__N)r   r   r   r@   r   r   r   r   r   ±   s   r   c               @   s   e Zd Zdd„ ZdS )z<TestClassGetitem.test_class_getitem_inheritance_2.<locals>.Dc             S   s   | j › d|j › dS )NrH   rD   )r   )rE   rF   r   r   r   r@   µ   s    zNTestClassGetitem.test_class_getitem_inheritance_2.<locals>.D.__class_getitem__N)r   r   r   r@   r   r   r   r   r   ´   s   r   zD[int]zD[D])r   rA   )r   r   r   r   r   r   Ú test_class_getitem_inheritance_2°   s    z1TestClassGetitem.test_class_getitem_inheritance_2c             C   sB   G dd„ dƒ}G dd„ d|ƒ}|   |t d¡ |   || d¡ d S )Nc               @   s   e Zd Zedd„ ƒZdS )z:TestClassGetitem.test_class_getitem_classmethod.<locals>.Cc             S   s   | j › d|j › dS )NrH   rD   )r   )rE   rF   r   r   r   r@   ¼   s    zLTestClassGetitem.test_class_getitem_classmethod.<locals>.C.__class_getitem__N)r   r   r   Úclassmethodr@   r   r   r   r   r   »   s   r   c               @   s   e Zd ZdS )z:TestClassGetitem.test_class_getitem_classmethod.<locals>.DN)r   r   r   r   r   r   r   r   ¿   s    r   zD[int]zD[D])r   rA   )r   r   r   r   r   r   Útest_class_getitem_classmethodº   s    z/TestClassGetitem.test_class_getitem_classmethodc             C   sB   G dd„ dƒ}G dd„ d|ƒ}|   |t d¡ |   || d¡ d S )Nc               @   s   e Zd Zdd„ ZdS )z6TestClassGetitem.test_class_getitem_patched.<locals>.Cc             S   s   dd„ }t |ƒ| _d S )Nc             S   s   | j › d|j › dS )NrH   rD   )r   )rE   rF   r   r   r   r@   Æ   s    zcTestClassGetitem.test_class_getitem_patched.<locals>.C.__init_subclass__.<locals>.__class_getitem__)rK   r@   )rE   r@   r   r   r   Ú__init_subclass__Å   s    zHTestClassGetitem.test_class_getitem_patched.<locals>.C.__init_subclass__N)r   r   r   rM   r   r   r   r   r   Ä   s   r   c               @   s   e Zd ZdS )z6TestClassGetitem.test_class_getitem_patched.<locals>.DN)r   r   r   r   r   r   r   r   É   s    r   zD[int]zD[D])r   rA   )r   r   r   r   r   r   Útest_class_getitem_patchedÃ   s    z+TestClassGetitem.test_class_getitem_patchedc             C   sH   G dd„ dt ƒ}G dd„ d|ƒ}|  |jd ¡ |t  |  |jt¡ d S )Nc               @   s   e Zd ZdZdd„ ZdS )z<TestClassGetitem.test_class_getitem_with_builtins.<locals>.ANc             S   s
   || _ d S )N)Úcalled_with)rE   rF   r   r   r   r@   Ñ   s    zNTestClassGetitem.test_class_getitem_with_builtins.<locals>.A.__class_getitem__)r   r   r   rO   r@   r   r   r   r   r   Î   s   r   c               @   s   e Zd ZdS )z<TestClassGetitem.test_class_getitem_with_builtins.<locals>.BN)r   r   r   r   r   r   r   r	   Ó   s   r	   )r#   ÚassertIsrO   rA   )r   r   r	   r   r   r   Ú test_class_getitem_with_builtinsÍ   s
    z1TestClassGetitem.test_class_getitem_with_builtinsc          	   C   s\   G dd„ dƒ}|   t¡ |t  W d Q R X G dd„ dƒ}|   t¡ |t  W d Q R X d S )Nc               @   s   e Zd Zdd„ ZdS )z=TestClassGetitem.test_class_getitem_errors.<locals>.C_too_fewc             S   s   d S )Nr   )rE   r   r   r   r@   Û   s    zOTestClassGetitem.test_class_getitem_errors.<locals>.C_too_few.__class_getitem__N)r   r   r   r@   r   r   r   r   r(   Ú   s   r(   c               @   s   e Zd Zdd„ ZdS )z>TestClassGetitem.test_class_getitem_errors.<locals>.C_too_manyc             S   s   d S )Nr   )rE   ZoneZtwor   r   r   r@   à   s    zPTestClassGetitem.test_class_getitem_errors.<locals>.C_too_many.__class_getitem__N)r   r   r   r@   r   r   r   r   r'   ß   s   r'   )r)   r*   rA   )r   r(   r'   r   r   r   Útest_class_getitem_errorsÙ   s    z*TestClassGetitem.test_class_getitem_errorsc          	   C   sš   G dd„ dƒ}|   t¡ |ƒ t  W d Q R X G dd„ dƒ}|ƒ }dd„ |_|   t¡ |t  W d Q R X G dd„ dƒ}|   t¡ |t  W d Q R X d S )	Nc               @   s   e Zd Zdd„ ZdS )z7TestClassGetitem.test_class_getitem_errors_2.<locals>.Cc             S   s   d S )Nr   )rE   rF   r   r   r   r@   ç   s    zITestClassGetitem.test_class_getitem_errors_2.<locals>.C.__class_getitem__N)r   r   r   r@   r   r   r   r   r   æ   s   r   c               @   s   e Zd ZdS )z7TestClassGetitem.test_class_getitem_errors_2.<locals>.EN)r   r   r   r   r   r   r   r   ë   s    r   c             S   s   dS )NzThis will not workr   )rE   rF   r   r   r   Ú<lambda>í   ó    z>TestClassGetitem.test_class_getitem_errors_2.<locals>.<lambda>c               @   s   e Zd ZdZdS )zDTestClassGetitem.test_class_getitem_errors_2.<locals>.C_not_callablez	Surprise!N)r   r   r   r@   r   r   r   r   r,   ð   s   r,   )r)   r*   rA   r@   )r   r   r   Úer,   r   r   r   Útest_class_getitem_errors_2å   s    
z,TestClassGetitem.test_class_getitem_errors_2c             C   s$   G dd„ dt ƒ}|  |t d¡ d S )Nc               @   s   e Zd Zdd„ ZdS )z;TestClassGetitem.test_class_getitem_metaclass.<locals>.Metac             S   s   | j › d|j › dS )NrH   rD   )r   )rE   rF   r   r   r   r@   ÷   s    zMTestClassGetitem.test_class_getitem_metaclass.<locals>.Meta.__class_getitem__N)r   r   r   r@   r   r   r   r   r6   ö   s   r6   z	Meta[int])r;   r   rA   )r   r6   r   r   r   Útest_class_getitem_metaclassõ   s    z-TestClassGetitem.test_class_getitem_metaclassc             C   s6   G dd„ dt ƒ}G dd„ d|d}|  |t d¡ d S )Nc               @   s   e Zd ZdS )z@TestClassGetitem.test_class_getitem_with_metaclass.<locals>.MetaN)r   r   r   r   r   r   r   r6   ü   s    r6   c               @   s   e Zd Zdd„ ZdS )z=TestClassGetitem.test_class_getitem_with_metaclass.<locals>.Cc             S   s   | j › d|j › dS )NrH   rD   )r   )rE   rF   r   r   r   r@   þ   s    zOTestClassGetitem.test_class_getitem_with_metaclass.<locals>.C.__class_getitem__N)r   r   r   r@   r   r   r   r   r   ý   s   r   )r8   zC[int])r;   r   rA   )r   r6   r   r   r   r   Ú!test_class_getitem_with_metaclassû   s    z2TestClassGetitem.test_class_getitem_with_metaclassc             C   s6   G dd„ dt ƒ}G dd„ d|d}|  |t d¡ d S )Nc               @   s   e Zd Zdd„ ZdS )zATestClassGetitem.test_class_getitem_metaclass_first.<locals>.Metac             S   s   dS )Nzfrom metaclassr   )rE   rF   r   r   r   Ú__getitem__  s    zMTestClassGetitem.test_class_getitem_metaclass_first.<locals>.Meta.__getitem__N)r   r   r   rY   r   r   r   r   r6     s   r6   c               @   s   e Zd Zdd„ ZdS )z>TestClassGetitem.test_class_getitem_metaclass_first.<locals>.Cc             S   s   dS )Nzfrom __class_getitem__r   )rE   rF   r   r   r   r@     s    zPTestClassGetitem.test_class_getitem_metaclass_first.<locals>.C.__class_getitem__N)r   r   r   r@   r   r   r   r   r     s   r   )r8   zfrom metaclass)r;   r   rA   )r   r6   r   r   r   r   Ú"test_class_getitem_metaclass_first  s    z3TestClassGetitem.test_class_getitem_metaclass_firstN)r   r   r   rC   rG   rI   rJ   rL   rN   rQ   rR   rV   rW   rX   rZ   r   r   r   r   r>   –   s   

	
r>   c               @   s   e Zd Zdd„ ZdS )ÚCAPITestc             C   s–   ddl m}m} |  | t¡|¡ |t }|  t|ƒ|¡ |  | 	d¡tf¡ G dd„ d|ƒ}|  |j
tf¡ |  |j|f¡ |  |j|ttf¡ d S )Nr   )ÚGenericÚGenericAliasr   c               @   s   e Zd ZdS )z CAPITest.test_c_class.<locals>.CN)r   r   r   r   r   r   r   r     s   r   )Z	_testcapir\   r]   ZassertIsInstancer@   rA   rP   r;   r   r   r   r   r   r   )r   r\   r]   Z
IntGenericr   r   r   r   Útest_c_class  s    zCAPITest.test_c_classN)r   r   r   r^   r   r   r   r   r[     s   r[   Ú__main__)
ZunittestZtestr   ZTestCaser   r>   Zcpython_onlyr[   r   Úmainr   r   r   r   Ú<module>   s    v
