HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/test/__pycache__/test_typing.cpython-37.opt-2.pyc
B

��g�r�
@s�ddlZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
ddlmZmZddl
mZmZddl
mZmZddl
mZmZmZddl
mZmZddl
mZmZmZdd	l
mZdd
l
mZmZddl
mZddl
mZdd
l
mZm Z ddl
m!Z!ddl
m"Z"ddl
m#Z#ddl
m$Z$m%Z%m&Z&ddl
m'Z'm(Z(ddl)Z)ddl
Z
ddl*Z*ddl+m,Z,Gdd�de�Z-Gdd�d�Z.Gdd�de.�Z/Gdd�de.�Z0Gdd�de/e0�Z1Gdd�de-�Z2Gd d!�d!e-�Z3Gd"d#�d#e-�Z4Gd$d%�d%e-�Z5Gd&d'�d'e-�Z6Gd(d)�d)e-�Z7ed*e8e9�Z:ed+�Z;Gd,d-�d-ee:e;f�Z<Gd.d/�d/e<e:e;f�Z=Gd0d1�d1e-�Z>Gd2d3�d3e-�Z?Gd4d5�d5e-�Z@Gd6d7�d7e-�ZAGd8d9�d9e-�ZBGd:d;�d;e-�ZCd<ZDyeEeD�WneFk
�r�d=ZGYnXd>ZGdd?l+mHZHmIZImJZJdd@l
mKZKGdAdB�dB�ZLGdCdD�dDeL�ZMGdEdF�dFeM�ZNGdGdH�dHee�ZOGdIdJ�dJ�ZPGdKdL�dLe#�ZQGdMdN�dNe#�ZRGdOdP�dPe#�ZSGdQdR�dRe#�ZTGdSdT�dTe,jL�ZUeKeVdU�dVdW�ZWyeWeX���Yd�Wn$eZk
�r�Z[zWddZ[[[XYnXeZ\GdXdY�dY�Z]GdZd[�d[e-�Z^Gd\d]�d]e-�Z_Gd^d_�d_e-�Z`Gd`da�dae-�ZaGdbdc�dce-�ZbGddde�dee-�ZcGdfdg�dge-�ZdGdhdi�die-�ZeGdjdk�dke-�Zfegdlk�r�e�dS)m�N)�TestCase�main�
skipUnless�SkipTest�skip)�copy�deepcopy)�Any�NoReturn)�TypeVar�AnyStr)�T�KT�VT)�Union�Optional)�Tuple�List�MutableMapping)�Callable)�Generic�ClassVar)�cast)�get_type_hints)�
no_type_check�no_type_check_decorator)�Type)�NewType)�
NamedTuple)�IO�TextIO�BinaryIO)�Pattern�Match)�mod_generics_cachec@s(eZdZddd�Zd	dd�Zdd�ZdS)
�BaseTestCaseNcCs8t||�s4d||f}|dk	r*|d|7}|�|��dS)Nz%r is not a subclass of %rz : %s)�
issubclass�failureException)�self�cls�class_or_tuple�msg�message�r-�,/usr/local/lib/python3.7/test/test_typing.py�assertIsSubclass!s

zBaseTestCase.assertIsSubclasscCs8t||�r4d||f}|dk	r*|d|7}|�|��dS)Nz%r is a subclass of %rz : %s)r&r')r(r)r*r+r,r-r-r.�assertNotIsSubclass(s

z BaseTestCase.assertNotIsSubclasscCsxtjD]
}|�qWdS)N)�typingZ	_cleanups)r(�fr-r-r.�clear_caches/szBaseTestCase.clear_caches)N)N)�__name__�
__module__�__qualname__r/r0r3r-r-r-r.r%s

r%c@seZdZdS)�EmployeeN)r4r5r6r-r-r-r.r74sr7c@seZdZdS)�ManagerN)r4r5r6r-r-r-r.r88sr8c@seZdZdS)�FounderN)r4r5r6r-r-r-r.r9<sr9c@seZdZdS)�ManagingFounderN)r4r5r6r-r-r-r.r:@sr:c@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�AnyTestsc	Cs$|�t��tdt�WdQRXdS)N�*)�assertRaises�	TypeError�
isinstancer	)r(r-r-r.�test_any_instance_type_errorFsz%AnyTests.test_any_instance_type_errorc	CsD|�t��ttt�WdQRX|�t��ttt�WdQRXdS)N)r=r>r&r7r	)r(r-r-r.�test_any_subclass_type_errorJsz%AnyTests.test_any_subclass_type_errorcCs|�tt�d�dS)Nz
typing.Any)�assertEqual�reprr	)r(r-r-r.�	test_reprPszAnyTests.test_reprc	CsB|�t��tdt�WdQRX|�t��ttWdQRXdS)Nr<)r=r>r&r	�int)r(r-r-r.�test_errorsSszAnyTests.test_errorsc	CsT|�t��Gdd�dt�}WdQRX|�t��Gdd�dtt��}WdQRXdS)Nc@seZdZdS)z(AnyTests.test_cannot_subclass.<locals>.AN)r4r5r6r-r-r-r.�A[srGc@seZdZdS)z(AnyTests.test_cannot_subclass.<locals>.AN)r4r5r6r-r-r-r.rG^s)r=r>r	�type)r(rGr-r-r.�test_cannot_subclassYszAnyTests.test_cannot_subclassc	Cs@|�t��t�WdQRX|�t��tt��WdQRXdS)N)r=r>r	rH)r(r-r-r.�test_cannot_instantiateasz AnyTests.test_cannot_instantiatecCs"tjttjttjtdS)N)r1r#r	r"r)r(r-r-r.�test_any_works_with_aliasgs

z"AnyTests.test_any_works_with_aliasN)
r4r5r6r@rArDrFrIrJrKr-r-r-r.r;Dsr;c@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�
NoReturnTestsc	Cs$|�t��tdt�WdQRXdS)Nr<)r=r>r?r
)r(r-r-r.�!test_noreturn_instance_type_errorpsz/NoReturnTests.test_noreturn_instance_type_errorc	CsD|�t��ttt�WdQRX|�t��ttt�WdQRXdS)N)r=r>r&r7r
)r(r-r-r.�!test_noreturn_subclass_type_errortsz/NoReturnTests.test_noreturn_subclass_type_errorcCs|�tt�d�dS)Nztyping.NoReturn)rBrCr
)r(r-r-r.rDzszNoReturnTests.test_reprc	Cs"|�t��ttWdQRXdS)N)r=r>r
rE)r(r-r-r.�test_not_generic}szNoReturnTests.test_not_genericc	CsT|�t��Gdd�dt�}WdQRX|�t��Gdd�dtt��}WdQRXdS)Nc@seZdZdS)z-NoReturnTests.test_cannot_subclass.<locals>.AN)r4r5r6r-r-r-r.rG�srGc@seZdZdS)z-NoReturnTests.test_cannot_subclass.<locals>.AN)r4r5r6r-r-r-r.rG�s)r=r>r
rH)r(rGr-r-r.rI�sz"NoReturnTests.test_cannot_subclassc	Cs@|�t��t�WdQRX|�t��tt��WdQRXdS)N)r=r>r
rH)r(r-r-r.rJ�sz%NoReturnTests.test_cannot_instantiateN)	r4r5r6rMrNrDrOrIrJr-r-r-r.rLnsrLc@s|eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS)�TypeVarTestscCs$td�}|�||�|�|t�dS)Nr
)rrB�assertIsInstance)r(r
r-r-r.�test_basic_plain�szTypeVarTests.test_basic_plainc	Cs,td�}|�t��td|�WdQRXdS)Nr
r<)rr=r>r?)r(r
r-r-r.� test_typevar_instance_type_error�sz-TypeVarTests.test_typevar_instance_type_errorc	CsLtd�}|�t��tt|�WdQRX|�t��t|t�WdQRXdS)Nr
)rr=r>r&rE)r(r
r-r-r.� test_typevar_subclass_type_error�s
z-TypeVarTests.test_typevar_subclass_type_errorc	Cs(|�t��tdt�}|WdQRXdS)N�X)r=r>rrE)r(rUr-r-r.�test_constrained_error�s
z#TypeVarTests.test_constrained_errorcCs�td�}td�}|�||�|�t||�|�t|t||f�|�t||f|�|�t|tft|�|�t|tftt�|�t|tfj|tf�|�t|tfj|f�|�t|tfjt�dS)NrU�Y)	r�assertNotEqualrBrrE�__args__�__parameters__�assertIs�
__origin__)r(rUrWr-r-r.�test_union_unique�szTypeVarTests.test_union_uniquecCs(tdtt�}|�t|tft|�dS)NrG)r�str�bytesrXr)r(rGr-r-r.�test_union_constrained�sz#TypeVarTests.test_union_constrainedcCs||�tt�d�|�tt�d�|�tt�d�|�tt�d�tddd�}|�t|�d�td	dd
�}|�t|�d�dS)Nz~Tz~KTz~VTz~AnyStr�T_coT)�	covariantz+T_co�T_contra)�
contravariantz	-T_contra)rBrCr
rrrr)r(rarcr-r-r.rD�szTypeVarTests.test_reprcCs4|�td�td��|�tdtt�tdtt��dS)Nr
)rXrrEr^)r(r-r-r.�test_no_redefinition�sz!TypeVarTests.test_no_redefinitionc	Cs.|�t��Gdd�dtd��}WdQRXdS)Nc@seZdZdS)z1TypeVarTests.test_cannot_subclass_vars.<locals>.VN)r4r5r6r-r-r-r.�V�srfr
)r=r>r)r(rfr-r-r.�test_cannot_subclass_vars�sz&TypeVarTests.test_cannot_subclass_varsc	Cs*|�t��Gdd�dt�}WdQRXdS)Nc@seZdZdS)z7TypeVarTests.test_cannot_subclass_var_itself.<locals>.VN)r4r5r6r-r-r-r.rf�srf)r=r>r)r(rfr-r-r.�test_cannot_subclass_var_itself�sz,TypeVarTests.test_cannot_subclass_var_itselfc	Cs$|�t��td��WdQRXdS)NrG)r=r>r)r(r-r-r.�test_cannot_instantiate_vars�sz)TypeVarTests.test_cannot_instantiate_varsc	CsL|�t��tddd�WdQRX|�t��tdtttd�WdQRXdS)NrUr<)�bound)r=r>rr^�floatr7)r(r-r-r.�test_bound_errors�szTypeVarTests.test_bound_errorscCsd}t|i�dS)Nz&import typing
T = typing.TypeVar('T')
)�exec)r(�coder-r-r.�test_missing__name__�sz!TypeVarTests.test_missing__name__c	Cs(|�t��tdddd�WdQRXdS)Nr
T)rbrd)r=�
ValueErrorr)r(r-r-r.�test_no_bivariant�szTypeVarTests.test_no_bivariantN)r4r5r6rRrSrTrVr]r`rDrergrhrirlrorqr-r-r-r.rP�s

rPc@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)S)*�
UnionTestscCstttf}|�|t�dS)N)rrErkrX)r(�ur-r-r.�test_basics�szUnionTests.test_basicsc	Cs�|�t��ttt�WdQRX|�t��ttt�WdQRX|�t��tttttf�WdQRX|�t��ttttft�WdQRXdS)N)r=r>r&rErr^)r(r-r-r.�test_subclass_error�szUnionTests.test_subclass_errorcCsltt}|�|t�tttf}tttf}tttf}|�||�|�|t�|�|t�|�|t�dS)N)rr	rBrE�objectrX)r(rs�u1�u2Zu3r-r-r.�test_union_any�szUnionTests.test_union_anycCsTtt}|�|t�tttf}tttf}|�||�|�|t�|�|t�dS)N)rrvrBrErX)r(rsrwrxr-r-r.�test_union_objectszUnionTests.test_union_objectcCs(tttf}tttf}|�||�dS)N)rrErkrB)r(rwrxr-r-r.�test_unordered
szUnionTests.test_unorderedcCstt}|�|t�dS)N)rr7r[)r(�tr-r-r.�test_single_class_disappearssz'UnionTests.test_single_class_disappearscCs8tttf}|�|t�|�t|j�|�t|j�dS)N)rr7r8rX�assertInrY)r(rsr-r-r.�test_base_class_keptszUnionTests.test_base_class_keptcCs2tttf}t|tf}|�|ttttf�dS)N)rrErkr7rB)r(rs�vr-r-r.�test_union_unionszUnionTests.test_union_unioncCs�|�tt�d�tttf}|�t|�dt�tttf}|�t|�dt�td�}t|tft}|�t|�tt��ttttf}|�t|�d�dS)Nztyping.Unionztyping.Union[%s.Employee, int]ztyping.Union[int, %s.Employee]r
z#typing.Union[typing.List[int], int])rBrCrr7rEr4rr)r(rsr
r-r-r.rD!szUnionTests.test_reprc	Cs�|�t��Gdd�dt�}WdQRX|�t��Gdd�dtt��}WdQRX|�t��Gdd�dtttf�}WdQRXdS)Nc@seZdZdS)z*UnionTests.test_cannot_subclass.<locals>.CN)r4r5r6r-r-r-r.�C/sr�c@seZdZdS)z*UnionTests.test_cannot_subclass.<locals>.CN)r4r5r6r-r-r-r.r�2sc@seZdZdS)z*UnionTests.test_cannot_subclass.<locals>.CN)r4r5r6r-r-r-r.r�5s)r=r>rrHrEr^)r(r�r-r-r.rI-szUnionTests.test_cannot_subclassc	Cs�|�t��t�WdQRX|�t��tt��WdQRXtttf}|�t��|�WdQRX|�t��t|��WdQRXdS)N)r=r>rrHrErk)r(rsr-r-r.rJ8sz"UnionTests.test_cannot_instantiatecCs�|�tttjtftk�|�tttjtftjtk�|�ttttjtfj�|�tjttttjtfj�dS)N)�assertFalserr^r1�IterablerEr~rY)r(r-r-r.�test_union_generalizationCs"z$UnionTests.test_union_generalizationcCsb|�tt�|�tt�|�tt�|�tt�|�dgt�|�ttj�|�ttjt�dS)N)	rXrrvr	rrr1�Mappingr)r(r-r-r.�test_union_compare_otherIsz#UnionTests.test_union_compare_othercCs$tt}ttdf}|�||�dS)N)rrErrB)r(�orsr-r-r.�
test_optionalRszUnionTests.test_optionalc	Cs"|�t��tdWdQRXdS)Nr-)r=r>r)r(r-r-r.�
test_emptyWszUnionTests.test_emptyc	Cs,|�t��tdtttf�WdQRXdS)Nr<)r=r>r?rrEr^)r(r-r-r.�test_union_instance_type_error[sz)UnionTests.test_union_instance_type_errorcCs2tttf}|d�dd�}|�t|�d|�dS)N)�xcSsdS)Nr-)r�r-r-r.r2a�z(UnionTests.test_no_eval_union.<locals>.fr�)rrEr^r[r)r(rsr2r-r-r.�test_no_eval_union_szUnionTests.test_no_eval_unioncCs*td�dd�}|�tt|tf�d�dS)N)�returncSsdS)Nr-r-r-r-r.�funer�z0UnionTests.test_function_repr_union.<locals>.funztyping.Union[fun, int])rErBrCr)r(r�r-r-r.�test_function_repr_uniondsz#UnionTests.test_function_repr_unioncCstttf}|dS)N)rr^r")r(rGr-r-r.�test_union_str_patternhsz!UnionTests.test_union_str_patterncsVyddlm�Wntk
r,td��YnXt�tf�fdd�}t|tfdS)Nr)�ElementzcElementTree not foundcs�|�S)Nr-)�args)r�r-r.�Elemvsz#UnionTests.test_etree.<locals>.Elem)Zxml.etree.cElementTreer��ImportErrorrrr^)r(r�r-)r�r.�
test_etreemszUnionTests.test_etreeN)r4r5r6rtruryrzr{r}rr�rDrIrJr�r�r�r�r�r�r�r�r�r-r-r-r.rr�s(
		rrc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�
TupleTestsc	Cs�|�t��tttttf�WdQRX|�t��tttttf�WdQRXGdd�dt�}|�ttt��|�t|t��dS)Nc@seZdZdS)z"TupleTests.test_basics.<locals>.TPN)r4r5r6r-r-r-r.�TP�sr�)r=r>r&rrEr^�tuple�
assertTrue)r(r�r-r-r.rt~szTupleTests.test_basicscCsd|�tttt�|�ttdfttdf�|�tttttf�|�ttttdf�dS)N.)rBrrErX)r(r-r-r.�
test_equality�szTupleTests.test_equalitycCs$Gdd�dt�}|�t|t��dS)Nc@seZdZdS)z/TupleTests.test_tuple_subclass.<locals>.MyTupleN)r4r5r6r-r-r-r.�MyTuple�sr�)r�r�r&r)r(r�r-r-r.�test_tuple_subclass�szTupleTests.test_tuple_subclassc	Cs8|�t��tdtttf�WdQRX|�dt�dS)N)rr)r=r>r?rrErQ)r(r-r-r.�test_tuple_instance_type_error�sz)TupleTests.test_tuple_instance_type_errorcCsX|�tt�d�|�ttd�d�|�ttttf�d�|�tttdf�d�dS)Nztyping.Tupler-ztyping.Tuple[()]ztyping.Tuple[int, float].ztyping.Tuple[int, ...])rBrCrrErk)r(r-r-r.rD�szTupleTests.test_reprc	CsH|�t��tdt�WdQRX|�t��tdtt�WdQRXdS)Nr<)r=r>r&rrE)r(r-r-r.rF�szTupleTests.test_errorsN)	r4r5r6rtr�r�r�rDrFr-r-r-r.r�|s
r�c@sTeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)�
CallableTestsc	CsT|�t��(|�ttdd��ttgtf��WdQRX|�ttdd��t��dS)NcSs|S)Nr-)r�r-r-r.�<lambda>�r�z2CallableTests.test_self_subclass.<locals>.<lambda>cSs|S)Nr-)r�r-r-r.r��r�)r=r>r�r&rHrrE)r(r-r-r.�test_self_subclass�s,z CallableTests.test_self_subclasscCs�|�ttgtfttgtf�|�tttgtfttgtfh�d�|�ttgtfttgtf�|�ttgtfttgtf�|�ttgtftttgtf�|�ttgtftgtf�|�ttgtft�dS)N�)rBrrE�lenrXr^)r(r-r-r.�test_eq_hash�s (  "zCallableTests.test_eq_hashc	Cs�|�t��t�WdQRX|�t��tt��WdQRXttgtf}|�t��|�WdQRX|�t��t|��WdQRXdS)N)r=r>rrHrEr^)r(�cr-r-r.rJ�sz%CallableTests.test_cannot_instantiatec	Cs�|�t��tdgtfWdQRX|�t��tdtfWdQRX|�t��tdgtfWdQRX|�t��ttdgdfWdQRX|�t��ttWdQRXdS)N.r-r��)r=r>rrE)r(r-r-r.�test_callable_wrong_forms�sz'CallableTests.test_callable_wrong_formscCs$dd�}|�|t�|�dt�dS)NcSsdS)Nr-r-r-r-r.r2�sz5CallableTests.test_callable_instance_works.<locals>.f)rQr�assertNotIsInstance)r(r2r-r-r.�test_callable_instance_works�sz*CallableTests.test_callable_instance_worksc	Cs�dd�}|�t��|�|tgdf�WdQRX|�t��|�|tgtf�WdQRX|�t��|�dtgdf�WdQRX|�t��|�dtgtf�WdQRXdS)NcSsdS)Nr-r-r-r-r.r2�sz:CallableTests.test_callable_instance_type_error.<locals>.f)r=r>rQrr	r�)r(r2r-r-r.�!test_callable_instance_type_error�sz/CallableTests.test_callable_instance_type_errorcCs\tgtf}|�t|�d�tttgtf}|�t|�d�tdtf}|�t|�d�dS)Nztyping.Callable[[], bool]z"typing.Callable[[str, float], int].ztyping.Callable[..., str])r�boolrBrCr^rkrE)r(Zct0Zct2Zctvr-r-r.rD�szCallableTests.test_reprcCs>tdtfd�dd�}|�t|t�t��dtdtfi�dS)N.)�acSsdS)Nr-)r�r-r-r.�foo�sz6CallableTests.test_callable_with_ellipsis.<locals>.foor�)rr
rBr�globals�locals)r(r�r-r-r.�test_callable_with_ellipsis�sz)CallableTests.test_callable_with_ellipsiscCstjtdtfdS)N.)r1rrr^)r(r-r-r.�test_ellipsis_in_generic�sz&CallableTests.test_ellipsis_in_genericN)r4r5r6r�r�rJr�r�r�rDr�r�r-r-r-r.r��s	r��XK�XVc@s@eZdZeed�dd�Zeed�dd�Zdeeed�d	d
�ZdS)�
SimpleMapping)�keyr�cCsdS)Nr-)r(r�r-r-r.�__getitem__�szSimpleMapping.__getitem__)r��valuecCsdS)Nr-)r(r�r�r-r-r.�__setitem__�szSimpleMapping.__setitem__N)r��defaultr�cCsdS)Nr-)r(r�r�r-r-r.�get�szSimpleMapping.get)N)r4r5r6r�r�r�r�r�r-r-r-r.r��sr�c@s@eZdZdd�Zed�dd�Zed�dd�Zded�d	d
�ZdS)�MySimpleMappingcCs
i|_dS)N)�store)r(r-r-r.�__init__szMySimpleMapping.__init__)r�cCs
|j|S)N)r�)r(r�r-r-r.r�szMySimpleMapping.__getitem__cCs||j|<dS)N)r�)r(r�r�r-r-r.r�szMySimpleMapping.__setitem__NcCs$y
|j|Stk
r|SXdS)N)r��KeyError)r(r�r�r-r-r.r�s
zMySimpleMapping.get)N)r4r5r6r�r^r�r�r�r-r-r-r.r�sr�c@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�
ProtocolTestscCs |�ttj�|�ttj�dS)N)r/rEr1�SupportsIntr0r^)r(r-r-r.�test_supports_intszProtocolTests.test_supports_intcCs |�ttj�|�ttj�dS)N)r/rkr1Z
SupportsFloatr0r^)r(r-r-r.�test_supports_floatsz!ProtocolTests.test_supports_floatcCs.Gdd�d�}|�|tj�|�ttj�dS)Nc@seZdZdd�ZdS)z.ProtocolTests.test_supports_complex.<locals>.CcSsdS)Nyr-)r(r-r-r.�__complex__#sz:ProtocolTests.test_supports_complex.<locals>.C.__complex__N)r4r5r6r�r-r-r-r.r�"sr�)r/r1�SupportsComplexr0r^)r(r�r-r-r.�test_supports_complexsz#ProtocolTests.test_supports_complexcCs.Gdd�d�}|�|tj�|�ttj�dS)Nc@seZdZdd�ZdS)z,ProtocolTests.test_supports_bytes.<locals>.BcSsdS)Nr�r-)r(r-r-r.�	__bytes__-sz6ProtocolTests.test_supports_bytes.<locals>.B.__bytes__N)r4r5r6r�r-r-r-r.�B,sr�)r/r1�
SupportsBytesr0r^)r(r�r-r-r.�test_supports_bytes)sz!ProtocolTests.test_supports_bytescCs.|�ttj�|�ttj�|�ttj�dS)N)r/rkr1�SupportsAbsrEr0r^)r(r-r-r.�test_supports_abs3szProtocolTests.test_supports_abscCs:tttj�|�ttj�|�ttj�|�ttj�dS)N)r&rkr1Z
SupportsRoundr/rEr0r^)r(r-r-r.�test_supports_round8sz!ProtocolTests.test_supports_roundcCs |�ttj�|�ttj�dS)N)r/�listr1�
Reversibler0rE)r(r-r-r.�test_reversible>szProtocolTests.test_reversiblec	CsZ|�t��tdtj�WdQRXGdd�dtj�}Gdd�d|�}|�}|�||�dS)Nrc@seZdZed�dd�ZdS)z;ProtocolTests.test_protocol_instance_type_error.<locals>.C1)r�cSsdS)Nr<r-)r(r-r-r.�__int__FszCProtocolTests.test_protocol_instance_type_error.<locals>.C1.__int__N)r4r5r6rEr�r-r-r-r.�C1Esr�c@seZdZdS)z;ProtocolTests.test_protocol_instance_type_error.<locals>.C2N)r4r5r6r-r-r-r.�C2Hsr�)r=r>r?r1r�r�rQ)r(r�r�r�r-r-r.�!test_protocol_instance_type_errorBsz/ProtocolTests.test_protocol_instance_type_errorN)r4r5r6r�r�r�r�r�r�r�r�r-r-r-r.r�s

r�c@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�Z d=d>�Z!d?d@�Z"dAdB�Z#dCdD�Z$dEdF�Z%dGdH�Z&dIdJ�Z'dKdL�Z(dMdN�Z)dOdP�Z*dQdR�Z+dSdT�Z,dUdV�Z-dWdX�Z.dYdZ�Z/d[d\�Z0d]d^�Z1d_d`�Z2daS)b�GenericTestsc	Cs�tttf}|�|jd�|�t��|tWdQRX|�t��|ttfWdQRXtttf}|�|jtf�|t|�t��|ttfWdQRXtttf}|�t��t	|t�WdQRX|�
|�t�dS)Nr-)r�r^r	rBrZr=r>r�rEr&rQ)r(rUrWZSM1r-r-r.rtPszGenericTests.test_basicsc	Csvtd�}td�}|�t��t|�WdQRX|�t��t||WdQRX|�t��t||WdQRX|�t�� Gdd�dt|t|�}WdQRX|�t��tgtt�WdQRX|�t��tttt�WdQRX|�t��Gdd�dt�}WdQRX|�t�� Gdd�dt|t|�}WdQRX|�t�� Gd	d�dt|t|�}WdQRXdS)
Nr
�Sc@seZdZdS)z+GenericTests.test_generic_errors.<locals>.CN)r4r5r6r-r-r-r.r�ksr�c@seZdZdS)z4GenericTests.test_generic_errors.<locals>.NewGenericN)r4r5r6r-r-r-r.�
NewGenericqsr�c@seZdZdS)z3GenericTests.test_generic_errors.<locals>.MyGenericN)r4r5r6r-r-r-r.�	MyGenericssr�c@seZdZdS)z3GenericTests.test_generic_errors.<locals>.MyGenericN)r4r5r6r-r-r-r.r�us)	rr=r>rr?rrEr&r�)r(r
r�r�r�r�r-r-r.�test_generic_errorsas($$z GenericTests.test_generic_errorsc	CsZtd�}td�}|�t��t||fWdQRX|�t��t|||fWdQRXdS)Nr
r�)rr=r>r)r(r
r�r-r-r.�	test_initwszGenericTests.test_initc	Cs�Gdd�dtjt�}Gdd�d|�}|�|jd�|�t��|jWdQRXd|_d|_Gdd	�d	|�}Gd
d�d|t�}|�|jd�|�|jd�|�|jd�dS)NcseZdZ�fdd�Z�ZS)z*GenericTests.test_init_subclass.<locals>.Xcst�jf|�d|_dS)Nr<)�super�__init_subclass__�attr)r)�kwargs)�	__class__r-r.r��sz<GenericTests.test_init_subclass.<locals>.X.__init_subclass__)r4r5r6r��
__classcell__r-r-)r�r.rU�srUc@seZdZdS)z*GenericTests.test_init_subclass.<locals>.YN)r4r5r6r-r-r-r.rW�srWr<r�r�c@seZdZdS)z*GenericTests.test_init_subclass.<locals>.ZN)r4r5r6r-r-r-r.�Z�sr�c@seZdZdS)z*GenericTests.test_init_subclass.<locals>.WN)r4r5r6r-r-r-r.�W�sr�)r1rr
rBr�r=�AttributeErrorrE)r(rUrWr�r�r-r-r.�test_init_subclassszGenericTests.test_init_subclasscCs4|�tt�dt�d��|�tt�dt�d��dS)Nz<class 'z.SimpleMapping'>z.MySimpleMapping'>)rBrCr�r4r�)r(r-r-r.rD�s

zGenericTests.test_reprcCs�td�}td�}Gdd�dt|�}|t||f}|�||t||f�|�||t||f�||tf}|�|||tf�|�|||tf�|�|||tf�|t}|�||t�|�||t�|�|||�|�t|��d��dS)Nr
r�c@seZdZdS)z'GenericTests.test_chain_repr.<locals>.CN)r4r5r6r-r-r-r.r��sr�z.C[typing.Tuple[str, int]])	rrrrBrXrEr^r��endswith)r(r
r�r�rUrWr�r-r-r.�test_chain_repr�s zGenericTests.test_chain_reprcCs�td�}tddd�}td�}|�tt�d�|�tt|�d�|�tt|�d�|�tt||t�d	�|�ttt�d	�dS)
Nr
�UT)rbr�ztyping.Listztyping.List[~T]ztyping.List[+U]ztyping.List[int])rrBrCrrE)r(r
r�r�r-r-r.�
test_new_repr�szGenericTests.test_new_reprcCs~td�}td�}|�ttj||f||f�d�|�ttt||ft|f�d�|�ttt||ftt�d�dS)Nr
�TSztyping.Mapping[~TS, ~T]z"typing.List[typing.Tuple[int, ~T]]z=typing.List[typing.Tuple[typing.List[int], typing.List[int]]])rrBrCr1r�rrrE)r(r
r�r-r-r.�test_new_repr_complex�s"z"GenericTests.test_new_repr_complexcCsZtd�}|�tt|�d�|�ttj|�d�Gdd�dtjttf�}t|j�dS)Nr
ztyping.Generic[~T]ztyping._Protocol[~T]c@seZdZdS)z*GenericTests.test_new_repr_bare.<locals>.CN)r4r5r6r-r-r-r.r��sr�)	rrBrCrr1�	_Protocol�Dictr	�__mro__)r(r
r�r-r-r.�test_new_repr_bare�s
zGenericTests.test_new_repr_barecCsptd�}Gdd�dt|�}|�}d|_|�|jddi�Gdd�d|t�}|�}d|_|�|jd	di�dS)
Nr
c@seZdZdS)z!GenericTests.test_dict.<locals>.BN)r4r5r6r-r-r-r.r��sr�r<r�c@seZdZdS)z!GenericTests.test_dict.<locals>.CN)r4r5r6r-r-r-r.r��sr��abc�bar)rrr�rB�__dict__rEr�)r(r
r��br�r�r-r-r.�	test_dict�szGenericTests.test_dictcCsTtd�}Gdd�dt|�}|�|tjd�|�||tjd�d||t_|�|jd�|�|tjd�d|tt_|�|jd�|�|ttjd�|�|�jd�|�|tt�jd�Gdd�d||�}|�|tjd�|�|jd�d	|_d
|t_|�|jd�|�|tjd�|�|jd
�|�|tjd	�dS)Nr
c@seZdZdZdS)z<GenericTests.test_subscripted_generics_as_proxies.<locals>.C�defN)r4r5r6r�r-r-r-r.r��sr�r�Zchanged�newc@seZdZdS)z<GenericTests.test_subscripted_generics_as_proxies.<locals>.DN)r4r5r6r-r-r-r.�D�sr�zfrom derived zzfrom derived x)	rrrBrEr�r^r�zr)r(r
r�r�r-r-r.�$test_subscripted_generics_as_proxies�s*
z1GenericTests.test_subscripted_generics_as_proxiescCs`td�}Gdd�dtjjt|�}|�t�|�d|�|t|�d|�|��|�	�dS)Nr
c@seZdZdS)z.GenericTests.test_abc_registry_kept.<locals>.CN)r4r5r6r-r-r-r.r��sr�r�)
r�collectionsr�r�r�registerrErQ�_abc_registry_clear�_abc_caches_clear)r(r
r�r-r-r.�test_abc_registry_kept�s
z#GenericTests.test_abc_registry_keptcCs4Gdd�dtttf�}|�i|�|�t|�dS)Nc@seZdZdS)z5GenericTests.test_false_subclasses.<locals>.MyMappingN)r4r5r6r-r-r-r.�	MyMappingsr�)rr^r�r0�dict)r(r�r-r-r.�test_false_subclassessz"GenericTests.test_false_subclassescCs`Gdd�dtttf�}|���|�|�tjj�|�|�t�|�|�t�|�i|�dS)Nc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)z'GenericTests.test_abc_bases.<locals>.MMcSsdS)Nr-)r(�kr-r-r.r�
sz3GenericTests.test_abc_bases.<locals>.MM.__getitem__cSsdS)Nr-)r(rr�r-r-r.r�sz3GenericTests.test_abc_bases.<locals>.MM.__setitem__cSsdS)Nr-)r(rr-r-r.�__delitem__sz3GenericTests.test_abc_bases.<locals>.MM.__delitem__cSstd�S)Nr-)�iter)r(r-r-r.�__iter__sz0GenericTests.test_abc_bases.<locals>.MM.__iter__cSsdS)Nrr-)r(r-r-r.�__len__sz/GenericTests.test_abc_bases.<locals>.MM.__len__N)r4r5r6r�r�rrrr-r-r-r.�MMs
r)rr^�updaterQr�r�r�r)r(rr-r-r.�test_abc_basess
zGenericTests.test_abc_basescCsVGdd�dtttftjj�}Gdd�dtjjtttf�}|�|jtjjtf�dS)Nc@seZdZdS)z-GenericTests.test_multiple_bases.<locals>.MM1N)r4r5r6r-r-r-r.�MM1sr	c@seZdZdS)z-GenericTests.test_multiple_bases.<locals>.MM2N)r4r5r6r-r-r-r.�MM2!sr
)rr^r�r�rB�	__bases__r)r(r	r
r-r-r.�test_multiple_basessz GenericTests.test_multiple_basescCs@td�}Gdd�dtjt|f�}|�|jtjt|ff�dS)Nr
c@seZdZdS)z'GenericTests.test_orig_bases.<locals>.CN)r4r5r6r-r-r-r.r�'sr�)rr1r�r^rB�__orig_bases__)r(r
r�r-r-r.�test_orig_bases%szGenericTests.test_orig_basesc	CsLdd�}|�|dditjttf��|�|dditjttf��|�t��|dditjttf�WdQRXdd�}Gdd�dt	t�}|�||t�|t��|�||t�|t��|�||t�t
��|�t��|dd	d
g|t�WdQRXdd�}Gd
d�dt
t�}|�|dd	d
g|��|�|ddg|��dS)NcsBt|j�dkrt�|jr>|j\��t��fdd�|��D��SdS)Nrc3s&|]\}}t|��ot|��VqdS)N)r?)�.0rr�)rrr-r.�	<genexpr>2szSGenericTests.test_naive_runtime_checks.<locals>.naive_dict_check.<locals>.<genexpr>)r�rZ�NotImplementedErrorrY�all�items)�obj�tpr-)rrr.�naive_dict_check+s
z@GenericTests.test_naive_runtime_checks.<locals>.naive_dict_checkr�r�cSst|d�st�|j|kS)N�__orig_class__)�hasattrrr)rrr-r-r.�naive_generic_check:s
zCGenericTests.test_naive_runtime_checks.<locals>.naive_generic_checkc@seZdZdS)z4GenericTests.test_naive_runtime_checks.<locals>.NodeN)r4r5r6r-r-r-r.�Node?srr��cst�fdd�|D��S)Nc3s$|]}t|�jdjd�VqdS)rN)r?r
rY)rr�)rr-r.rHszXGenericTests.test_naive_runtime_checks.<locals>.naive_list_base_check.<locals>.<genexpr>)r)rrr-)rr.�naive_list_base_checkFszEGenericTests.test_naive_runtime_checks.<locals>.naive_list_base_checkc@seZdZdS)z1GenericTests.test_naive_runtime_checks.<locals>.CN)r4r5r6r-r-r-r.r�Jsr�r�r�)r�r1r�r^rEr�r=rr
rr)r(rrrrr�r-r-r.�test_naive_runtime_checks*s 
"z&GenericTests.test_naive_runtime_checkscCs"td�}td�}td�}Gdd�dt|||�}Gdd�d|t|||�}|�|j|f�|�|j|f�|�|tjd�|�|tjd�|�|tjtf�|�|tjtf�|�|jttf�|�|j|ttf�|�|j	t|||f�|�|j	|t|||f�dS)	Nr
r�rfc@seZdZdS)z.GenericTests.test_multi_subscr_base.<locals>.CN)r4r5r6r-r-r-r.r�Rsr�c@seZdZdS)z.GenericTests.test_multi_subscr_base.<locals>.DN)r4r5r6r-r-r-r.r�Ssr�r-)
rrrBrZrErYrr�rr
)r(r
r�rfr�r�r-r-r.�test_multi_subscr_baseNsz#GenericTests.test_multi_subscr_basecCsjtd�}Gdd�dt�}|�t|t|�|�t|tf|t|tf�|�td|fjt|f�dS)Nr
c@seZdZdS)z.GenericTests.test_subscript_meta.<locals>.MetaN)r4r5r6r-r-r-r.�Metaasr.)	rrHrBrrrErrY�Ellipsis)r(r
rr-r-r.�test_subscript_meta_s
 z GenericTests.test_subscript_metacCs�Gdd�dtt�}Gdd�dtt�}|�||�|�tjttjt�|�|j|j�|�tjj|jttjj|jt�|�||j�|�|tj�|�|tjj�|�|jtj�|�|jtjj�|�|t|jt�|�|tt	|jtt	�|�|ttjt�|�|ttjjt�|�|jt
tjt
�|�|jtt	tjjtt	�|�t|tt|jt�|�t|tt	t|jtt	�|�tt|tftttjtf�|�t|t|tft|ttjtf�|�t
j|tt
jtjjt�tjdd�dk�r�|�tt|t��d��|�tt|jt��d��|�tttjt��d	��|�tttjjt��d
��dS)Nc@seZdZdS)z+GenericTests.test_generic_hashes.<locals>.AN)r4r5r6r-r-r-r.rGgsrGc@s eZdZGdd�dee�ZdS)z+GenericTests.test_generic_hashes.<locals>.Bc@seZdZdS)z-GenericTests.test_generic_hashes.<locals>.B.AN)r4r5r6r-r-r-r.rGksrGN)r4r5r6rr
rGr-r-r-r.r�jsr�r�)rr�z<locals>.A[str]]z<locals>.B.A[str]]zmod_generics_cache.A[str]]zmod_generics_cache.B.A[str]])rr
rBr$rGr^r�rXrr	rErrr1�	FrozenSet�sys�version_infor�rCr�)r(rGr�r-r-r.�test_generic_hashesfs@"&&z GenericTests.test_generic_hashesc	Cstd�}td�}|�t||fttttf�|�tjt||f|tjt||f�|�t��t|tfdWdQRX|�t��t||f|dfWdQRX|�t|tftt�|�t||ftttt	ffttt	f�Gdd�d�}Gdd�d|�}|�t||ft||ft||f�|�t��t|tfd	WdQRX|�t
|g|ftt
tgtf�|�t
dt|ftt
dttf�|�t��t
|g|fdtfWdQRX|�t��t
|g|fgtfWdQRXdS)
Nr
r�r-.c@seZdZdS)z9GenericTests.test_extended_generic_rules_eq.<locals>.BaseN)r4r5r6r-r-r-r.�Base�sr&c@seZdZdS)z<GenericTests.test_extended_generic_rules_eq.<locals>.DerivedN)r4r5r6r-r-r-r.�Derived�sr'r�)
rrBrrEr1r�r=r>rr^rrr)r(r
r�r&r'r-r-r.�test_extended_generic_rules_eq�s* ,,($( z+GenericTests.test_extended_generic_rules_eqcCs�td�}|�ttttf��dd�d�|�tttttf��dd�d�|�ttdt|ft��dd�d�|�ttgt	|ft��dd�d�dS)	Nr
ztyping.�zUnion[Tuple, Callable]zUnion[Tuple, Tuple[int]].z#Callable[..., Union[int, NoneType]]zCallable[[], List[int]])
rrBrCrrr�replacerErr)r(r
r-r-r.� test_extended_generic_rules_repr�s""z-GenericTests.test_extended_generic_rules_reprcCs�ttdd�dd�}Gdd�d�}|�t|t�t��dtt|i�td�}t|df}|d�d	d
�}|�t|t�t��d|�tdt|f}|d�dd�}|�t|t�t��d|�dS)
N�CC)r�cSsdS)Nr-)r�r-r-r.�foobar�r�z5GenericTests.test_generic_forward_ref.<locals>.foobarc@seZdZdS)z1GenericTests.test_generic_forward_ref.<locals>.CCN)r4r5r6r-r-r-r.r,�sr�r
.cSsdS)Nr-)r�r-r-r.�barfoo�r�z5GenericTests.test_generic_forward_ref.<locals>.barfoocSsdS)Nr-)r�r-r-r.�barfoo2�r�z6GenericTests.test_generic_forward_ref.<locals>.barfoo2)	rrBrr�r�rrr[r)r(r-r,r
�ATr.ZCTr/r-r-r.�test_generic_forward_ref�sz%GenericTests.test_generic_forward_refc	Cs�Gdd�dtttf�}Gdd�dttdf�}Gdd�dttgtf�}Gdd	�d	tdtf�}|�|jttf�|�|ttfjttf�|�|ttfj	|�|�|jtf�|�
t��|tWdQRX|�
t��|ttfWdQRX|�t|t��
d
�dd�|�|jd
�|�|�tjj�|�|tjj�|�|tjj�|�|�t�|�|t�|�
t��tttdftj�WdQRX|�
t��tttdftj�WdQRXdS)Nc@seZdZdS)z@GenericTests.test_extended_generic_rules_subclassing.<locals>.T1N)r4r5r6r-r-r-r.�T1�sr2c@seZdZdS)z@GenericTests.test_extended_generic_rules_subclassing.<locals>.T2N)r4r5r6r-r-r-r.�T2�sr3.c@seZdZdS)z@GenericTests.test_extended_generic_rules_subclassing.<locals>.C1N)r4r5r6r-r-r-r.r��sr�c@seZdZdd�ZdS)z@GenericTests.test_extended_generic_rules_subclassing.<locals>.C2cSsdS)Nr-)r(r-r-r.�__call__�szIGenericTests.test_extended_generic_rules_subclassing.<locals>.C2.__call__N)r4r5r6r4r-r-r-r.r��sr��.���zC1[int]r-)rr
rrrErBrZr^rYr\r=r>rC�splitrQr�r�r/r�r&r1�Sequencer�)r(r2r3r�r�r-r-r.�'test_extended_generic_rules_subclassing�s.z4GenericTests.test_extended_generic_rules_subclassingc	Cs�|�t��ttWdQRX|�t��ttWdQRX|�t��ttWdQRX|�t��tttWdQRXdS)N)r=r>rrrrrrE)r(r-r-r.�test_fail_with_bare_union�sz&GenericTests.test_fail_with_bare_unionc	Csltd�}|�t��ttWdQRX|�t��tt|WdQRX|�t��ttjWdQRXdS)Nr
)rr=r>rrrr1r�)r(r
r-r-r.�test_fail_with_bare_generic�sz(GenericTests.test_fail_with_bare_genericcCsztd�}|��Gdd�dt||f�}|�|t�j|�|�|t�j|t�Gdd�dtd|f�}|�||�j|�|�||�j||�Gdd�dtj	||f�}|�|t�j|�|�|t�j|t�Gd	d
�d
tj
t|f�}|�|t�j|�|�|t�j|t�tj
dk�rvGdd
�d
tjt|f�}|�|t�j|�|�|t�j|t�dS)Nr
c@seZdZdS)z5GenericTests.test_type_erasure_special.<locals>.MyTupN)r4r5r6r-r-r-r.�MyTup�sr<c@seZdZdd�ZdS)z6GenericTests.test_type_erasure_special.<locals>.MyCallcSsdS)Nr-)r(r-r-r.r4�r�z?GenericTests.test_type_erasure_special.<locals>.MyCall.__call__N)r4r5r6r4r-r-r-r.�MyCall�sr=.c@seZdZdS)z6GenericTests.test_type_erasure_special.<locals>.MyDictN)r4r5r6r-r-r-r.�MyDictsr>c@seZdZdS)z5GenericTests.test_type_erasure_special.<locals>.MyDefN)r4r5r6r-r-r-r.�MyDefsr?)rrc@seZdZdS)z7GenericTests.test_type_erasure_special.<locals>.MyChainN)r4r5r6r-r-r-r.�MyChainsr@)rr3rr[rEr�rrr1r��DefaultDictr^r#r$�ChainMap)r(r
r<r=r>r?r@r-r-r.�test_type_erasure_special�s$z&GenericTests.test_type_erasure_specialcCs�dd�tjD�}x�|D]�}|�t|�d�|�||�t|dd�rdt|j�dkrd|�|tj	tf�t
|t�rx*|jD] }|�t|�d�|�||�qvWqWdS)Ncss|]}tt|�VqdS)N)�getattrr1)r�elr-r-r.r
sz4GenericTests.test_all_repr_eq_any.<locals>.<genexpr>r)rZr�)
r1�__all__rXrCrBrDr�rZr	rYr?rHr�)r(Zobjsr�baser-r-r.�test_all_repr_eq_anys

z!GenericTests.test_all_repr_eq_anyc
Cs�td�}Gdd�dt|�}Gdd�d|t�at�}d|_d|_x\ttjd�D]J}t�	||�}t�
|�}|�|jd�|�|jd�|�|jddd	��qRWt
tttttttfttttd
fttgtftjtjtg}xF|D]>}x8ttjd�D]&}t�	||�}t�
|�}|�||�q�Wq�Wttjtjtttjtjtjtttfg}	xJ|	D]B}x:ttjd�D](}t�	||�}t�
|�}|�||��qpW�q\WdS)Nr
c@seZdZdS)z#GenericTests.test_pickle.<locals>.BN)r4r5r6r-r-r-r.r�sr�c@seZdZdS)r�N)r4r5r6r-r-r-r.r�sr�r<r�r�)r�r�.)rrrEr�r�r��range�pickle�HIGHEST_PROTOCOL�dumps�loadsrBr�r	rrrrr^rr_r1rAr"r�rr��AbstractSet)
r(r
r�r��protor�r�Zsamples�sZmore_samplesr-r-r.�test_pickles6

&



zGenericTests.test_picklecCstd�}Gdd�dt|�}t|tft|tftd|fttgtftttf|||t|ttj|tjttjttj	tt
ftj	|tftttt|tdtdtftdtj
dtfg}x2|tgD]$}|�|t|��|�|t|��q�WdS)Nr
c@seZdZdS)z1GenericTests.test_copy_and_deepcopy.<locals>.NodeN)r4r5r6r-r-r-r.r=sr.)r
r
)rrrrErrr	r1r�r�r^rrr�rBrr)r(r
r�thingsr|r-r-r.�test_copy_and_deepcopy;s*$" z#GenericTests.test_copy_and_deepcopycCs�td�atdtd�atdtt�ax^tttttj	t
tjtt
ttgD]<}|�t|�|�|�t|�|�|�t�t�|��|�q@Wtd�}tdtd�}tdtt�}x2|||gD]$}|�t|�|�|�t|�|�q�WdS)Nr��TPB)rj�TPV�TL�TLB�TLV)rr�rErTr_r^rUrr1r�rr�rr	rrr[rrrJrMrL)r(rUrVrWrXr-r-r.�$test_immutability_by_copy_and_pickleGsz1GenericTests.test_immutability_by_copy_and_picklecs&td��G�fdd�dt��}|d�}|�t|�jd�|�t|�jd�|�t|�|�|�t|�|�d|_|�t|�jd�|�t|�jd�|td�}|�t|�jd�|�t|�jd�|�t|�|�|�t|�|�d|_|�t|�jd�|�t|�jd�|�|j|t�dS)Nr
cseZdZ�dd�dd�ZdS)z3GenericTests.test_copy_generic_instances.<locals>.CN)r�r�cSs
||_dS)N)r�)r(r�r-r-r.r�^sz<GenericTests.test_copy_generic_instances.<locals>.C.__init__)r4r5r6r�r-)r
r-r.r�]sr�r<r�)	rrrBrr�r�assertIsNotrEr)r(r�r�Zcir-)r
r.�test_copy_generic_instances[s&z(GenericTests.test_copy_generic_instancesc	Csztd�}tt|tftd|ftttfttttj	tt
ftjjt
tjdg}x |D]}|�t�|��|�qZWdS)Nr
.�whatever)rr	rrErrrrr1r�r^�rer#r_r�rB�weakref�ref)r(r
rRr|r-r-r.�test_weakref_allss 
zGenericTests.test_weakref_allc	Cs�td�}Gdd�dt|�}|�}|t�}d|_d|_|�t��d|_WdQRX|�t��d|_WdQRX|dd�dd�}|�t|t	�t
��d||�|�t|t�t|t��dS)	Nr
c@seZdZdZdS)z0GenericTests.test_parameterized_slots.<locals>.C)�potatoN)r4r5r6�	__slots__r-r-r-r.r�}sr�r)r�cSsdS)Nr-)r�r-r-r.r��r�z2GenericTests.test_parameterized_slots.<locals>.foor�)
rrrErar=r�ZtomatorBrr�r�rr)r(r
r�r�Zc_intr�r-r-r.�test_parameterized_slots{s
 z%GenericTests.test_parameterized_slotsc	Csttd�}Gdd�dt|�}|�}|t�}d|_d|_|�t��d|_WdQRX|�t��d|_WdQRXdS)Nr
c@seZdZddiZdS)z5GenericTests.test_parameterized_slots_dict.<locals>.D�bananar<N)r4r5r6rbr-r-r-r.r��sr�Zyes�no)rrrErdr=r�r-)r(r
r��dZd_intr-r-r.�test_parameterized_slots_dict�s
z*GenericTests.test_parameterized_slots_dictc	Cs:|�t��&tttf}Gdd�dt|�}WdQRXdS)Nc@seZdZdS)z#GenericTests.test_errors.<locals>.CN)r4r5r6r-r-r-r.r��sr�)r=r>r�r�r	r)r(r�r�r-r-r.rF�szGenericTests.test_errorscCs�Gdd�dtt�}|�|jt�|�|jd�|t}|�|jt�|�t|��d�dd�Gdd�d|t�}|�|jt�|�|jd	�dS)
Nc@seZdZdS)z#GenericTests.test_repr_2.<locals>.CN)r4r5r6r-r-r-r.r��sr�z#GenericTests.test_repr_2.<locals>.Cr5r6zC[int]c@seZdZdS)z#GenericTests.test_repr_2.<locals>.YN)r4r5r6r-r-r-r.rW�srWz#GenericTests.test_repr_2.<locals>.Y)	rr
rBr5r4r6rErCr7)r(r�rUrWr-r-r.�test_repr_2�szGenericTests.test_repr_2cCs8|�tt�|�tttt�|�tttt�dS)N)rBrr
rXrr)r(r-r-r.�	test_eq_1�szGenericTests.test_eq_1cCslGdd�dtt�}Gdd�dtt�}|�||�|�||�|�|t|t�|�|t|t�dS)Nc@seZdZdS)z!GenericTests.test_eq_2.<locals>.AN)r4r5r6r-r-r-r.rG�srGc@seZdZdS)z!GenericTests.test_eq_2.<locals>.BN)r4r5r6r-r-r-r.r��sr�)rr
rBrX)r(rGr�r-r-r.�	test_eq_2�szGenericTests.test_eq_2cCsvGdd�dtttf�}Gdd�dtttf�}Gdd�d|ttfttttf|ttf�}|�|jtttf�dS)Nc@seZdZdS)z1GenericTests.test_multiple_inheritance.<locals>.AN)r4r5r6r-r-r-r.rG�srGc@seZdZdS)z1GenericTests.test_multiple_inheritance.<locals>.BN)r4r5r6r-r-r-r.r��sr�c@seZdZdS)z1GenericTests.test_multiple_inheritance.<locals>.CN)r4r5r6r-r-r-r.r��sr�)rr
rrrBrZ)r(rGr�r�r-r-r.�test_multiple_inheritance�s.z&GenericTests.test_multiple_inheritancecCsNtd�}Gdd�dt|�}Gdd�dtt|�}|�|j|t|ttf�dS)Nr�c@seZdZdS)z9GenericTests.test_multiple_inheritance_special.<locals>.BN)r4r5r6r-r-r-r.r��sr�c@seZdZdS)z9GenericTests.test_multiple_inheritance_special.<locals>.CN)r4r5r6r-r-r-r.r��sr�)rrrrErBr�r�rv)r(r�r�r�r-r-r.�!test_multiple_inheritance_special�sz.GenericTests.test_multiple_inheritance_specialc	s�Gdd�dt��G��fdd�d��Gdd�dtt��}|����Gdd�d|�}WdQRX|����Gd	d�d|t�}WdQRXdS)
Nc@seZdZdS)zDGenericTests.test_init_subclass_super_called.<locals>.FinalExceptionN)r4r5r6r-r-r-r.�FinalException�srmcs&eZdZdd����fdd�Z�ZS)z;GenericTests.test_init_subclass_super_called.<locals>.FinalN)r�cs<x(|jD]}|�k	rt|��r�|��qWt�jf|�dS)N)rr&r�r�)r)r�rG)�Finalrmr�r-r.r��szMGenericTests.test_init_subclass_super_called.<locals>.Final.__init_subclass__)r4r5r6r�r�r-)rnrm)r�r.rn�srnc@seZdZdS)z:GenericTests.test_init_subclass_super_called.<locals>.TestN)r4r5r6r-r-r-r.�Test�sroc@seZdZdS)z>GenericTests.test_init_subclass_super_called.<locals>.SubclassN)r4r5r6r-r-r-r.�Subclass�srpc@seZdZdS)z>GenericTests.test_init_subclass_super_called.<locals>.SubclassN)r4r5r6r-r-r-r.rp�s)�	Exceptionrr
r=rE)r(rorpr-)rnrmr.�test_init_subclass_super_called�sz,GenericTests.test_init_subclass_super_calledcCsrt}Gdd�d|t�}|tjt}Gdd�d|�}|�}|�g�|�d�|�d�|�|��ddg�dS)Nc@s4eZdZdZed�dd�Zdd�Zed�dd	�ZdS)
z)GenericTests.test_nested.<locals>.VisitorN)r�cSs
||_dS)N)r�)r(r�r-r-r.�set�sz-GenericTests.test_nested.<locals>.Visitor.setcSs|jS)N)r�)r(r-r-r.r��sz-GenericTests.test_nested.<locals>.Visitor.get)r�cSs|jS)N)r�)r(r-r-r.�visit�sz/GenericTests.test_nested.<locals>.Visitor.visit)r4r5r6r�r
rsr�rtr-r-r-r.�Visitor�sruc@seZdZed�dd�ZdS)z0GenericTests.test_nested.<locals>.IntListVisitor)r�cSs|j�|�dS)N)r��append)r(r�r-r-r.rvsz7GenericTests.test_nested.<locals>.IntListVisitor.appendN)r4r5r6rErvr-r-r-r.�IntListVisitorsrwr�r<)	rr
r1rrErsrvrBr�)r(�Grurfrwr�r-r-r.�test_nested�s



zGenericTests.test_nestedcsBtd��G�fdd�dt����d����fdd�}|d�dS)Nr
cs eZdZd�ddd�dd�ZdS)z,GenericTests.test_type_erasure.<locals>.NodeNzNode[T])�label�left�rightcSs||_||_||_dS)N)rzr{r|)r(rzr{r|r-r-r.r�sz5GenericTests.test_type_erasure.<locals>.Node.__init__)NN)r4r5r6r�r-)r
r-r.rsr)r�cs~�|�}��|�}�t|�}��t|�����t|�����t|�����|j|���|j|���|j|�dS)N)r	r[rHrBrz)r�r�r�r�)rr
r(r-r.r�sz+GenericTests.test_type_erasure.<locals>.foor<)rr)r(r�r-)rr
r(r.�test_type_erasureszGenericTests.test_type_erasurec	Cs�td�}Gdd�dt|�}Gdd�d|�}|�|jd�|�t��|tWdQRX|�t��|tWdQRX|�t��||WdQRXdS)Nr
c@seZdZdS)z)GenericTests.test_implicit_any.<locals>.CN)r4r5r6r-r-r-r.r�'sr�c@seZdZdS)z)GenericTests.test_implicit_any.<locals>.DN)r4r5r6r-r-r-r.r�*sr�r-)rrrBrZr=rqrEr	)r(r
r�r�r-r-r.�test_implicit_any$szGenericTests.test_implicit_anycCsNGdd�dtt�}Gdd�d�}Gdd�d||�}|d�}|�|jd�dS)Nc@seZdZdS)z*GenericTests.test_new_with_args.<locals>.AN)r4r5r6r-r-r-r.rG8srGcseZdZ�fdd�Z�ZS)z*GenericTests.test_new_with_args.<locals>.Bcst��|�}||_|S)N)r��__new__�arg)r)r�r)r�r-r.r<sz2GenericTests.test_new_with_args.<locals>.B.__new__)r4r5r6rr�r-r-)r�r.r�;sr�c@seZdZdS)z*GenericTests.test_new_with_args.<locals>.CN)r4r5r6r-r-r-r.r�Csr�r�)rr
rBr�)r(rGr�r�r�r-r-r.�test_new_with_args6s
zGenericTests.test_new_with_argscCsLGdd�d�}Gdd�dtt|�}|d�}|�|jd�|�|jd�dS)NcseZdZ�fdd�Z�ZS)z+GenericTests.test_new_with_args2.<locals>.Acs||_t���dS)N)�from_ar�r�)r(r�)r�r-r.r�Lsz4GenericTests.test_new_with_args2.<locals>.A.__init__)r4r5r6r�r�r-r-)r�r.rGKsrGcseZdZ�fdd�Z�ZS)z+GenericTests.test_new_with_args2.<locals>.Ccs||_t��|�dS)N)�from_cr�r�)r(r�)r�r-r.r�Ssz4GenericTests.test_new_with_args2.<locals>.C.__init__)r4r5r6r�r�r-r-)r�r.r�Rsr�r�)rr
rBr�r�)r(rGr�r�r-r-r.�test_new_with_args2Is
z GenericTests.test_new_with_args2c	Cs�Gdd�dtt�}|�t��|d�WdQRXGdd�d�}Gdd�d||�}|d�}|�|jd�|�|jd�|�|jd	�dS)
Nc@seZdZdS)z(GenericTests.test_new_no_args.<locals>.AN)r4r5r6r-r-r-r.rG^srGr�cseZdZ�fdd�Z�ZS)z(GenericTests.test_new_no_args.<locals>.Bcst��|�}d|_|S)Nr�)r�r�from_b)r)r)r�r-r.resz0GenericTests.test_new_no_args.<locals>.B.__new__)r4r5r6rr�r-r-)r�r.r�dsr�cs$eZdZdd�Z�fdd�Z�ZS)z(GenericTests.test_new_no_args.<locals>.CcSs
||_dS)N)r�)r(r�r-r-r.r�msz1GenericTests.test_new_no_args.<locals>.C.__init__cst��|�}d|_|S)Nr�)r�rr�)r)r�r)r�r-r.rpsz0GenericTests.test_new_no_args.<locals>.C.__new__)r4r5r6r�rr�r-r-)r�r.r�lsr�r�r�)rr
r=r>rBr�r�r�)r(rGr�r�r�r-r-r.�test_new_no_args\s
zGenericTests.test_new_no_argsN)3r4r5r6rtr�r�r�rDr�r�r�r�r�r�r�rrrrrrr!r%r(r+r1r9r:r;rCrHrQrSrYr[r`rcrgrFrhrirjrkrlrrryr}r~r�r�r�r-r-r-r.r�Ns`
$+
	#

r�c@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�
ClassVarTestsc	Csf|�t��tdWdQRX|�t��tttfWdQRX|�t��tttWdQRXdS)Nr�)r=r>rrEr^)r(r-r-r.rt~szClassVarTests.test_basicscCsH|�tt�d�tt}|�t|�d�tt}|�t|�dt�dS)Nztyping.ClassVarztyping.ClassVar[int]ztyping.ClassVar[%s.Employee])rBrCrrEr7r4)r(Zcvr-r-r.rD�s
zClassVarTests.test_reprc	Cs\|�t��Gdd�dtt��}WdQRX|�t��Gdd�dttt��}WdQRXdS)Nc@seZdZdS)z-ClassVarTests.test_cannot_subclass.<locals>.CN)r4r5r6r-r-r-r.r��sr�c@seZdZdS)z-ClassVarTests.test_cannot_subclass.<locals>.CN)r4r5r6r-r-r-r.r��s)r=r>rHrrE)r(r�r-r-r.rI�sz"ClassVarTests.test_cannot_subclassc	Csh|�t��t�WdQRX|�t��tt��WdQRX|�t��tttt��WdQRXdS)N)r=r>rrHrrE)r(r-r-r.�test_cannot_init�szClassVarTests.test_cannot_initc	CsH|�t��tdtt�WdQRX|�t��ttt�WdQRXdS)Nr�)r=r>r?rrEr&)r(r-r-r.�test_no_isinstance�sz ClassVarTests.test_no_isinstanceN)r4r5r6rtrDrIr�r�r-r-r-r.r�|s
r�c@seZdZdd�Zdd�ZdS)�	CastTestscCs�|�ttd�d�|�ttd�d�|�tttd��t�|�ttd�d�|�ttd�d�|�ttt	tfd�d�|�tt
d�d�|�tdd�d�dS)Nr<)rBrrErkr[rHr	r�rr^r)r(r-r-r.rt�szCastTests.test_basicscCstdd�tdd�dS)Nr<Zhello)r)r(r-r-r.rF�s
zCastTests.test_errorsN)r4r5r6rtrFr-r-r-r.r��s
r�c@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3S)4�ForwardRefTestscCs�Gdd�dtt�}|t}t|jt�t��}|�|dt|t�|�|dt|t�|�|d|d�|�|dtt�|�	d|�t|j
t�t��}|�|dt|t�t|jt�t��}|�|dt|t�dS)Nc@sPeZdZed�dd�Zddded�dd	�Zedd
�dd�Zddd
�d
d�Z	dS)z)ForwardRefTests.test_basics.<locals>.Node)rzcSs||_d|_|_dS)N)rzr{r|)r(rzr-r-r.r��sz2ForwardRefTests.test_basics.<locals>.Node.__init__NzOptional[Node[T]]zNode[T])r{r|�stuffcSs||_||_dS)N)r{r|)r(r{r|r��blahr-r-r.�add_both�sz2ForwardRefTests.test_basics.<locals>.Node.add_both)�nodecSs|�|d�dS)N)r�)r(r�r-r-r.�add_left�sz2ForwardRefTests.test_basics.<locals>.Node.add_leftcSs|�d|�dS)N)r�)r(r�r-r-r.�	add_right�sz3ForwardRefTests.test_basics.<locals>.Node.add_right)NNN)N)
r4r5r6r
r�rEr�rr�r�r-r-r-r.r�srr{r|r�r�r�)rr
rErr�r�r�rBr�assertNotInr�r�)r(rr|Z
both_hintsZ
left_hintsZright_hintsr-r-r.rt�szForwardRefTests.test_basicsc	Cs.t�d�}|�t��td|�WdQRXdS)NrEr<)r1�
ForwardRefr=r>r?)r(�frr-r-r.�#test_forwardref_instance_type_error�s
z3ForwardRefTests.test_forwardref_instance_type_errorc	Cs.t�d�}|�t��tt|�WdQRXdS)NrE)r1r�r=r>r&rE)r(r�r-r-r.�#test_forwardref_subclass_type_error�s
z3ForwardRefTests.test_forwardref_subclass_type_errorcCs4t�d�}|�|t�d��|�tdtt�dS)NrE)r1r�rBrXrrE)r(r�r-r-r.�test_forward_equality�s
z%ForwardRefTests.test_forward_equalitycCs�t�d�}t�d�}t�d�}t�d�}Gdd�d�}||d�dd�}|�t|t�t��||d��|�||�|�||�|�||�|�t|t|�|�t|t|�|�t|t|�|�t	||ft	|�|�t	||t
ft	|t
f�dS)Nr�c@seZdZdS)z4ForwardRefTests.test_forward_equality_gth.<locals>.CN)r4r5r6r-r-r-r.r��s)r�r�cSsdS)Nr-)r�r�r-r-r.r��sz6ForwardRefTests.test_forward_equality_gth.<locals>.foo)r1r�rBrr�r�rrXZassertEqualsrrE)r(�c1�c1_gth�c2�c2_gthr�r�r-r-r.�test_forward_equality_gth�s



z)ForwardRefTests.test_forward_equality_gthcCs�t�d�}t�d�}t�d�}t�d�}||d�dd�}t|t�t��|�t|�t|��|�t|�t|��|�t|�t|��dS)NrE)r�r�cSsdS)Nr-)r�r�r-r-r.r�sz7ForwardRefTests.test_forward_equality_hash.<locals>.foo)r1r�rr�r�rB�hash)r(r�r�r�r�r�r-r-r.�test_forward_equality_hashs



z*ForwardRefTests.test_forward_equality_hashcCsBGdd�d�}dd�}dd�}|�|�|��|�|�|��dS)Nc@seZdZdS)z:ForwardRefTests.test_forward_equality_namespace.<locals>.AN)r4r5r6r-r-r-r.rGsrGcSs,t�d�}|d�dd�}t|t�t��|S)NrG)r�cSsdS)Nr-)r�r-r-r.r�szPForwardRefTests.test_forward_equality_namespace.<locals>.namespace1.<locals>.fun)r1r�rr�r�)r�r�r-r-r.�
namespace1s
zCForwardRefTests.test_forward_equality_namespace.<locals>.namespace1cSs:t�d�}Gdd�d�}|d�dd�}t|t�t��|S)NrGc@seZdZdS)zNForwardRefTests.test_forward_equality_namespace.<locals>.namespace2.<locals>.AN)r4r5r6r-r-r-r.rGs)r�cSsdS)Nr-)r�r-r-r.r�szPForwardRefTests.test_forward_equality_namespace.<locals>.namespace2.<locals>.fun)r1r�rr�r�)r�rGr�r-r-r.�
namespace2s

zCForwardRefTests.test_forward_equality_namespace.<locals>.namespace2)rBrX)r(rGr�r�r-r-r.�test_forward_equality_namespaces
z/ForwardRefTests.test_forward_equality_namespacecCs|�ttd�d�dS)NrEztyping.List[ForwardRef('int')])rBrCr)r(r-r-r.�test_forward_repr&sz!ForwardRefTests.test_forward_reprcCs6tdd�dd�}|�t|t�t��dtti�dS)Nr
)r�cSsdS)Nr-)r�r-r-r.r�+sz/ForwardRefTests.test_union_forward.<locals>.foor�)rrBrr�r�r
)r(r�r-r-r.�test_union_forward)sz"ForwardRefTests.test_union_forwardcCs6tdd�dd�}|�t|t�t��dtti�dS)Nr
)r�cSsdS)Nr-)r�r-r-r.r�3sz/ForwardRefTests.test_tuple_forward.<locals>.foor�)rrBrr�r�r
)r(r�r-r-r.�test_tuple_forward1sz"ForwardRefTests.test_tuple_forwardcCsDdd�}dd�}dd�}|�}|�}|�||�|�t|||�dS)NcSs0t�d�}|}|d�dd�}t|t�t��}|S)NrG)r�cSsdS)Nr-)r�r-r-r.r�=r�zPForwardRefTests.test_forward_recursion_actually.<locals>.namespace1.<locals>.fun)r1r�rr�r�)r�rGr��retr-r-r.r�:s

zCForwardRefTests.test_forward_recursion_actually.<locals>.namespace1cSs0t�d�}|}|d�dd�}t|t�t��}|S)NrG)r�cSsdS)Nr-)r�r-r-r.r�Er�zPForwardRefTests.test_forward_recursion_actually.<locals>.namespace2.<locals>.fun)r1r�rr�r�)r�rGr�r�r-r-r.r�Bs

zCForwardRefTests.test_forward_recursion_actually.<locals>.namespace2cSs||kS)Nr-)Zo1Zo2r-r-r.�cmpJsz<ForwardRefTests.test_forward_recursion_actually.<locals>.cmp)rZr=�RecursionError)r(r�r�r�Zr1Zr2r-r-r.�test_forward_recursion_actually9sz/ForwardRefTests.test_forward_recursion_actuallycs�td�tt�f�G�fdd�d�}G��fdd�d�}G��fdd�d�}G��fdd	�d	�}|�t|t�t��t|t�t���|�t|t�t��d
tttttttdffi�|�t|t�t��d
ttttttdffi�|�t|t�t��d
ttttttttdffttttdffi�|�t|t�t��d
ttttttdftttttttdfffi�dS)N�ValuecseZdZUe�ed<dS)z7ForwardRefTests.test_union_forward_recursion.<locals>.Cr�N)r4r5r6r�__annotations__r-)r�r-r.r�Vs
r�cseZdZUe��fed<dS)z7ForwardRefTests.test_union_forward_recursion.<locals>.Dr�N)r4r5r6rr�r-)r��	ValueListr-r.r�Xs
r�cs"eZdZUee��fed<dS)z7ForwardRefTests.test_union_forward_recursion.<locals>.Er�N)r4r5r6rrr�r-)r�r�r-r.�EZs
r�cs$eZdZUe�e��fed<dS)z7ForwardRefTests.test_union_forward_recursion.<locals>.Fr�N)r4r5r6rrr�r-)r�r�r-r.�F\s
r�r�)rrr^rBrr�r�)r(r�r�r�r�r-)r�r�r.�test_union_forward_recursionRs($&"z,ForwardRefTests.test_union_forward_recursioncCsBtdgdfd�dd�}|�t|t�t��dttgtfi�dS)Nr
)r�cSsdS)Nr-)r�r-r-r.r�tsz2ForwardRefTests.test_callable_forward.<locals>.foor�)rrBrr�r�r
)r(r�r-r-r.�test_callable_forwardrsz%ForwardRefTests.test_callable_forwardcCs6dd�dd�}|�t|t�t��dtdtfi�dS)NzCallable[..., T])r�cSsdS)Nr-)r�r-r-r.r�|sz@ForwardRefTests.test_callable_with_ellipsis_forward.<locals>.foor�.)rBrr�r�rr
)r(r�r-r-r.�#test_callable_with_ellipsis_forwardzsz3ForwardRefTests.test_callable_with_ellipsis_forwardc	Cs"|�t��tdWdQRXdS)Nz/T)r=�SyntaxErrorr)r(r-r-r.�test_syntax_error�sz!ForwardRefTests.test_syntax_errorc	Cs0dd�dd�}|�t��t|�WdQRXdS)NzNode[T)r�cSsdS)Nr-)r�r-r-r.r��sz6ForwardRefTests.test_delayed_syntax_error.<locals>.foo)r=r�r)r(r�r-r-r.�test_delayed_syntax_error�sz)ForwardRefTests.test_delayed_syntax_errorc	Cs4tdd�dd�}|�t��t|�WdQRXdS)NZ42)r�cSsdS)Nr-)r�r-r-r.r��sz,ForwardRefTests.test_type_error.<locals>.foo)rr=r>r)r(r�r-r-r.�test_type_error�szForwardRefTests.test_type_errorc	Cs4dd�dd�}|�t��t|t��WdQRXdS)NzNoode[T])r�cSsdS)Nr-)r�r-r-r.r��sz,ForwardRefTests.test_name_error.<locals>.foo)r=�	NameErrorrr�)r(r�r-r-r.�test_name_error�szForwardRefTests.test_name_errorcCs,tdid�dd��}t|�}|�|i�dS)N�	whatevers)r�r�cSsdS)Nr-)r�r-r-r.r��sz/ForwardRefTests.test_no_type_check.<locals>.foo)rrrB)r(r��thr-r-r.�test_no_type_check�sz"ForwardRefTests.test_no_type_checkcCsDtGdd�d��}t|j�}|�|i�t|�j�}|�|i�dS)Nc@seZdZdid�dd�ZdS)z3ForwardRefTests.test_no_type_check_class.<locals>.Cr�)r�r�cSsdS)Nr-)r�r-r-r.r��sz7ForwardRefTests.test_no_type_check_class.<locals>.C.fooN)r4r5r6r�r-r-r-r.r��sr�)rrr�rB)r(r��cth�ithr-r-r.�test_no_type_check_class�s

z(ForwardRefTests.test_no_type_check_classcs@Gdd�d��tG�fdd�d���}|�t�j�dti�dS)Nc@seZdZed�dd�ZdS)z6ForwardRefTests.test_no_type_check_no_bases.<locals>.C)r�cSsdS)Nr-)r(r�r-r-r.�meth�r�z;ForwardRefTests.test_no_type_check_no_bases.<locals>.C.methN)r4r5r6rEr�r-r-r-r.r��sr�cseZdZ�ZdS)z6ForwardRefTests.test_no_type_check_no_bases.<locals>.DN)r4r5r6r�r-)r�r-r.r��sr�r�)rrBrr�rE)r(r�r-)r�r.�test_no_type_check_no_bases�sz+ForwardRefTests.test_no_type_check_no_basescCspGdd�d�}Gdd�d�}Gdd�d�}Gdd�d�}d	tjti}x$||||gD]}|�t|�|�qTWdS)
Nc@s eZdZUdZejeed<dS)zCForwardRefTests.test_no_type_check_forward_ref_as_string.<locals>.C�r�N)r4r5r6r�r1rrEr�r-r-r-r.r��s
r�c@seZdZUdZeeed<dS)zCForwardRefTests.test_no_type_check_forward_ref_as_string.<locals>.Dr�r�N)r4r5r6r�rrEr�r-r-r-r.r��s
r�c@seZdZUdZded<dS)zCForwardRefTests.test_no_type_check_forward_ref_as_string.<locals>.Er�ztyping.ClassVar[int]r�N)r4r5r6r�r�r-r-r-r.r��s
r�c@seZdZUdZded<dS)zCForwardRefTests.test_no_type_check_forward_ref_as_string.<locals>.Fr�z
ClassVar[int]r�N)r4r5r6r�r�r-r-r-r.r��s
r�r�)r1rrErBr)r(r�r�r�r�Zexpected_result�clazzr-r-r.�(test_no_type_check_forward_ref_as_string�sz8ForwardRefTests.test_no_type_check_forward_ref_as_stringc
CsPGdd�d�}Gdd�d�}x.||gD]"}|�t��t|�WdQRXq&WdS)Nc@seZdZUdZded<dS)zGForwardRefTests.test_nested_classvar_fails_forward_ref_check.<locals>.Er�z%typing.ClassVar[typing.ClassVar[int]]r�N)r4r5r6r�r�r-r-r-r.r��s
r�c@seZdZUdZeded<dS)zGForwardRefTests.test_nested_classvar_fails_forward_ref_check.<locals>.Fr�z
ClassVar[int]r�N)r4r5r6r�rr�r-r-r-r.r��s
r�)r=r>r)r(r�r�r�r-r-r.�,test_nested_classvar_fails_forward_ref_check�s
z<ForwardRefTests.test_nested_classvar_fails_forward_ref_checkcCs�tdd��}|�|jd�|did�dd��}|Gdd	�d	��}|�|jd
�t|�}|�|i�t|j�}|�|i�t|�j�}|�|i�dS)NcSs|S)Nr-)�funcr-r-r.�magic_decorator�sz@ForwardRefTests.test_meta_no_type_check.<locals>.magic_decoratorr�r�)r�r�cSsdS)Nr-)r�r-r-r.r��sz4ForwardRefTests.test_meta_no_type_check.<locals>.fooc@seZdZdid�dd�ZdS)z2ForwardRefTests.test_meta_no_type_check.<locals>.Cr�)r�r�cSsdS)Nr-)r�r-r-r.r��sz6ForwardRefTests.test_meta_no_type_check.<locals>.C.fooN)r4r5r6r�r-r-r-r.r��sr�r�)rrBr4rr�)r(r�r�r�r�r�r�r-r-r.�test_meta_no_type_check�s
z'ForwardRefTests.test_meta_no_type_checkcCs>d}i}t||�t|dj�}|�||d|dd��dS)Nz^class C:
    def foo(self, a: 'C') -> 'D': pass
class D:
    def bar(self, b: 'D') -> C: pass
r�r�)r�r�)rmrr�rB)r(rn�nsZhintsr-r-r.�test_default_globals�s

z$ForwardRefTests.test_default_globalsN)r4r5r6rtr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r-r-r-r.r��s2$ 		
r�c@seZdZdd�Zdd�ZdS)�
OverloadTestsc	Cs8ddlm}|�t��|dd��}|�WdQRXdS)Nr)�overloadcSsdS)Nr-r-r-r-r.r�sz/OverloadTests.test_overload_fails.<locals>.blah)r1r�r=�RuntimeError)r(r�r�r-r-r.�test_overload_fails�sz!OverloadTests.test_overload_failscCs*ddlm}|dd��}dd�}|�dS)Nr)r�cSsdS)Nr-r-r-r-r.r�
sz2OverloadTests.test_overload_succeeds.<locals>.blahcSsdS)Nr-r-r-r-r.r�s)r1r�)r(r�r�r-r-r.�test_overload_succeedssz$OverloadTests.test_overload_succeedsN)r4r5r6r�r�r-r-r-r.r��sr�a
import asyncio

T_a = TypeVar('T_a')

class AwaitableWrapper(typing.Awaitable[T_a]):

    def __init__(self, value):
        self.value = value

    def __await__(self) -> typing.Iterator[T_a]:
        yield
        return self.value

class AsyncIteratorWrapper(typing.AsyncIterator[T_a]):

    def __init__(self, value: typing.Iterable[T_a]):
        self.value = value

    def __aiter__(self) -> typing.AsyncIterator[T_a]:
        return self

    @asyncio.coroutine
    def __anext__(self) -> T_a:
        data = yield from self.value
        if data:
            return data
        else:
            raise StopAsyncIteration

class ACM:
    async def __aenter__(self) -> int:
        return 42
    async def __aexit__(self, etype, eval, tb):
        return None
FT)�
ann_module�ann_module2�ann_module3)�AsyncContextManagerc@seZdZUeed<dS)rG�yN)r4r5r6rkr�r-r-r-r.rGEs
rGc@s2eZdZUdZeeded<eed<eed<dS)r�Nr�r�r�)r4r5r6r�rrr�rEr-r-r-r.r�Gs
r�c@s eZdZUe�Zeded<dS)�CSubr�N)r4r5r6r�r�rr�r-r-r-r.r�Ks
r�c@s"eZdZUgZeeeed<dS)rx�lstN)r4r5r6r�rrr
r�r-r-r-r.rxMs
rxc@seZdZUded<ded<dS)�NoneAndForward�parentN�meaning)r4r5r6r�r-r-r-r.r�Ps
r�c@seZdZUeed<eed<dS)�CoolEmployee�name�coolN)r4r5r6r^r�rEr-r-r-r.r�Ts
r�c@s"eZdZUeed<dZeed<dS)�CoolEmployeeWithDefaultr�rr�N)r4r5r6r^r�r�rEr-r-r-r.r�Xs
r�c@seZdZUeed<dd�ZdS)�XMethr�cCs
d|jS)Nr�)r�)r(r-r-r.�double^szXMeth.doubleN)r4r5r6rEr�r�r-r-r-r.r�\s
r�c@s2eZdZUeed<dZeed<dd�Zdd�ZdS)	�XReprr�r�r�cCs|j�d|j��S)Nz -> )r�r�)r(r-r-r.�__str__dsz
XRepr.__str__cCsdS)Nrr-)r(�otherr-r-r.�__add__fsz
XRepr.__add__N)r4r5r6rEr�r�r�r�r-r-r-r.r�as
r�c@seZdZUded<ded<dS)�HasForeignBaseClassr��
some_xreprzmod_generics_cache.A�other_aN)r4r5r6r�r-r-r-r.r�is
r�)�amc
�s"|4IdH�}|SQIdHRXdS)Nr-)r�r�r-r-r.�g_withmsr�c@s:eZdZejdd�dd��Zejejdd�dd���ZdS)�
ForRefExample)r(cCsdS)Nr-)r(r-r-r.r�zszForRefExample.funccCsdS)Nr-)r(r-r-r.�nested~szForRefExample.nestedN)r4r5r6r�Zdecr�r�r-r-r-r.r�ys
r�c@sdeZdZdd�Zdd�Zed�dd��Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�GetTypeHintTestsc	Cs^|�t��td�WdQRX|�t��td�WdQRX|�t��td�WdQRXdS)N�{r�)r=r>�gth)r(r-r-r.�(test_get_type_hints_from_various_objects�sz9GetTypeHintTests.test_get_type_hints_from_various_objectscCsJdtttfttd�}|�tt�|�|�tt�i�|�tt�i�dS)Nr�)r�r2r�r�)rrEr^rBr�r�r�r�)r(Zann_module_type_hintsr-r-r.�test_get_type_hints_modules�sz,GetTypeHintTests.test_get_type_hints_modulesz	known bugcCs*ttjttjd�}|�tt�|�dS)N)Z	default_aZ	default_b)rr$rGr�rBr�)r(Z	mgc_hintsr-r-r.�&test_get_type_hints_modules_forwardref�sz7GetTypeHintTests.test_get_type_hints_modules_forwardrefcCs<|�ttj�dttji�|�ttj�t�|�ttj�dt	d��|�ttj
�ttttjd��|�ttj�dt
i�|�ttj�dttji�|�ttj�ttd��|�ttj�dt
i�|�tt�tt	d�d��|�tt�ttjtjd	��|�ttj�t
t
d��|�ttj�tjjtjjtjd
��dS)Nr�r�)Z123r�)�jrr�r�)r�r�r�)r�r�)r�r�Zsome_b)Zmy_inner_a1Zmy_inner_a2Z
my_outer_a)rBr�r�r�rrQZj_classr��MrHr�r^rWrEZh_classr�r�r�r�r�r$rGr�r)r(r-r-r.�test_get_type_hints_classes�s,

z,GetTypeHintTests.test_get_type_hints_classescCs�tGdd�d��}|�|j�|�|jjj�|�ttjj	�i�Gdd�dt
t�}tGdd�d|��}|�t|j	�dti�dS)Nc@seZdZGdd�d�ZdS)z>GetTypeHintTests.test_respect_no_type_check.<locals>.NoTpCheckc@seZdZdd�dd�ZdS)zBGetTypeHintTests.test_respect_no_type_check.<locals>.NoTpCheck.Innz
not a type)r�cSsdS)Nr-)r(r�r-r-r.r��r�zKGetTypeHintTests.test_respect_no_type_check.<locals>.NoTpCheck.Inn.__init__N)r4r5r6r�r-r-r-r.�Inn�sr�N)r4r5r6r�r-r-r-r.�	NoTpCheck�sr�c@seZdZed�dd�ZdS)z:GetTypeHintTests.test_respect_no_type_check.<locals>.ABase)r�cSsdS)Nr-)r�r-r-r.r��r�z?GetTypeHintTests.test_respect_no_type_check.<locals>.ABase.methN)r4r5r6rEr�r-r-r-r.�ABase�sr�c@seZdZdS)z8GetTypeHintTests.test_respect_no_type_check.<locals>.DerN)r4r5r6r-r-r-r.�Der�sr�r�)
rr�Z__no_type_check__r�r�rBr�r�ZNTCr�rr
rE)r(r�r�r�r-r-r.�test_respect_no_type_check�sz+GetTypeHintTests.test_respect_no_type_checkcCs||�tt�i�|�tt�i�|�tt�i�|�tt�i�|�ttj�i�|�tt�j�i�|�ttj	�i�dS)N)
rBr�rErH�dirr�rvr�r^�join)r(r-r-r.� test_get_type_hints_for_builtins�sz1GetTypeHintTests.test_get_type_hints_for_builtinscCsPdd�}d|jd<|�t|�dti�dd�dd�}|�t|�dtd�i�dS)NcSsdS)Nr-)r�r�r-r-r.�testf�r�z6GetTypeHintTests.test_previous_behavior.<locals>.testfrEr�)r�cSsdS)Nr-)r�r-r-r.�testg�r�z6GetTypeHintTests.test_previous_behavior.<locals>.testg)r�rBr�rErH)r(r�r�r-r-r.�test_previous_behavior�s

z'GetTypeHintTests.test_previous_behaviorcCsHGdd�d�}Gdd�d�}|�}ddi|_|�t|t��d|i�dS)Nc@seZdZdS)zKGetTypeHintTests.test_get_type_hints_for_object_with_annotations.<locals>.AN)r4r5r6r-r-r-r.rG�srGc@seZdZdS)zKGetTypeHintTests.test_get_type_hints_for_object_with_annotations.<locals>.BN)r4r5r6r-r-r-r.r��sr�r�)r�rBr�r�)r(rGr�r�r-r-r.�/test_get_type_hints_for_object_with_annotations�s

z@GetTypeHintTests.test_get_type_hints_for_object_with_annotationsc	Cs�|�ttjtj�dtjtji�|�ttt��t	tt
tt	d��|�ttt��ttt	t	tt
td��|�tt�dtt
ti�dS)N�var)r�r�r�)r�r�r�r�r�)rBr�r�ZCVr�r1rr�r�rErr�rxrr
)r(r-r-r.�test_get_type_hints_ClassVar�s
z-GetTypeHintTests.test_get_type_hints_ClassVarcCs0dti}|�ttj�|�|�ttj�|�dS)Nr()r�rBr�r�r�)r(Zexpectsr-r-r.�,test_get_type_hints_wrapped_decoratored_func�sz=GetTypeHintTests.test_get_type_hints_wrapped_decoratored_funcN)r4r5r6r�r�rr�r�r�r�r�r�r�r�r-r-r-r.r��s		

r�c@s�eZdZdd�Zdd�Zdd�Zeed�dd	��Zeed�d
d��Z	eed�dd
��Z
eed�dd��Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�Z d:d;�Z!d<d=�Z"d>d?�Z#ee$j%d@kdA�dBdC��Z&ee$j%d@kdA�dDdE��Z'dFdG�Z(dHdI�Z)dJdK�Z*dLdM�Z+dNdO�Z,dPdQ�Z-dRdS�Z.dTdU�Z/dVdW�Z0dXdY�Z1dZd[�Z2d\d]�Z3d^d_�Z4d`da�Z5dbdc�Z6ddde�Z7dfdg�Z8dhS)i�CollectionsAbcTestscCs |�dtj�|�gtj�dS)Nr<)rQr1�Hashabler�)r(r-r-r.�
test_hashable�sz!CollectionsAbcTests.test_hashablecCsX|�gtj�|�gtj�|�gtj�|�dtj�|�ttj�|�ttj�dS)Nr<)rQr1r�r�r/r�)r(r-r-r.�
test_iterable�sz!CollectionsAbcTests.test_iterablecCs(tg�}|�|tj�|�dtj�dS)Nr<)rrQr1�Iteratorr�)r(�itr-r-r.�
test_iterator�sz!CollectionsAbcTests.test_iteratorz&Python 3.5 and multithreading requiredcCsJi}tdt�|�|d}|�}|�|tj�|�|tj�|�d�dS)NzPasync def foo() -> typing.Awaitable[int]:
    return await AwaitableWrapper(42)
r�)rmr�rQr1�	Awaitabler��send)r(r�r��gr-r-r.�test_awaitables
z"CollectionsAbcTests.test_awaitablec	Cs�i}tdt�|�|d}|�}|�|tj�|�t��t|tjt�WdQRX|�	|tj�y|�
d�Wntk
r�YnXdS)Nzasync def foo():
    return
r�)rmr�rQr1�	Coroutiner=r>r?rEr�r�
StopIteration)r(r�r�r	r-r-r.�test_coroutines
z"CollectionsAbcTests.test_coroutinecCs>td�}t|�}|�|tj�|�|tj�|�dtj�dS)N�
r<)rI�AsyncIteratorWrapperrQr1�
AsyncIterabler�)r(�base_itrr-r-r.�test_async_iterable s
z'CollectionsAbcTests.test_async_iterablecCs0td�}t|�}|�|tj�|�dtj�dS)Nrr<)rIrrQr1�
AsyncIteratorr�)r(rrr-r-r.�test_async_iterator(sz'CollectionsAbcTests.test_async_iteratorcCs |�gtj�|�dtj�dS)Nr<)rQr1�Sizedr�)r(r-r-r.�
test_sized/szCollectionsAbcTests.test_sizedcCs |�gtj�|�dtj�dS)Nr<)rQr1�	Containerr�)r(r-r-r.�test_container3sz"CollectionsAbcTests.test_containercCsJttd�rF|�t�tj�|�t�tj�|�ttj�|�dtj�dS)N�
Collectionr<)	rr1rQr�r�	frozensetr/r�r�)r(r-r-r.�test_collection7s

z#CollectionsAbcTests.test_collectioncCs"|�t�tj�|�dtj�dS)Nr<)rQrsr1rNr�)r(r-r-r.�test_abstractset>sz$CollectionsAbcTests.test_abstractsetcCs$|�t�tj�|�t�tj�dS)N)rQrsr1�
MutableSetr�r)r(r-r-r.�test_mutablesetBsz#CollectionsAbcTests.test_mutablesetcCs |�itj�|�dtj�dS)Nr<)rQr1r�r�)r(r-r-r.�test_mappingFsz CollectionsAbcTests.test_mappingcCs |�itj�|�dtj�dS)Nr<)rQr1rr�)r(r-r-r.�test_mutablemappingJsz'CollectionsAbcTests.test_mutablemappingcCs |�gtj�|�dtj�dS)Nr<)rQr1r8r�)r(r-r-r.�
test_sequenceNsz!CollectionsAbcTests.test_sequencecCs |�gtj�|�dtj�dS)Nr-)rQr1�MutableSequencer�)r(r-r-r.�test_mutablesequenceRsz(CollectionsAbcTests.test_mutablesequencecCs$|�dtj�|�td�tj�dS)Nr�)rQr1�
ByteString�	bytearray)r(r-r-r.�test_bytestringVsz#CollectionsAbcTests.test_bytestringcCs|�ttj�dS)N)r/r�r1r)r(r-r-r.�	test_listZszCollectionsAbcTests.test_listcCs:|�tjtj�Gdd�dtjt�}|�|�tj�dS)Nc@seZdZdS)z/CollectionsAbcTests.test_deque.<locals>.MyDequeN)r4r5r6r-r-r-r.�MyDeque_sr()r/r��dequer1�DequerErQ)r(r(r-r-r.�
test_deque]szCollectionsAbcTests.test_dequecCs|�tjtj�dS)N)r/r��Counterr1)r(r-r-r.�test_counterbsz CollectionsAbcTests.test_countercCs |�ttj�|�ttj�dS)N)r/rsr1�Setr0r)r(r-r-r.�test_seteszCollectionsAbcTests.test_setcCs |�ttj�|�ttj�dS)N)r/rr1r"r0rs)r(r-r-r.�test_frozensetisz"CollectionsAbcTests.test_frozensetcCs|�ttj�dS)N)r/r�r1r�)r(r-r-r.r�mszCollectionsAbcTests.test_dictc	Csf|�t��t��WdQRX|�t��tjt�WdQRX|�t��tjt�WdQRXdS)N)r=r>r1rr
rE)r(r-r-r.�test_no_list_instantiationpsz.CollectionsAbcTests.test_no_list_instantiationcCsRGdd�dtjt�}|�}|�||�|�|tj�|�|t�|�t|�dS)Nc@seZdZdS)z6CollectionsAbcTests.test_list_subclass.<locals>.MyListN)r4r5r6r-r-r-r.�MyListzsr2)r1rrErQr8r/r�r0)r(r2r�r-r-r.�test_list_subclassxsz&CollectionsAbcTests.test_list_subclassc	Csn|�t��t��WdQRX|�t��tjttf�WdQRX|�t��tjttf�WdQRXdS)N)r=r>r1r�rrr^rE)r(r-r-r.�test_no_dict_instantiation�sz.CollectionsAbcTests.test_no_dict_instantiationcCsVGdd�dtjttf�}|�}|�||�|�|tj�|�|t�|�t|�dS)Nc@seZdZdS)z6CollectionsAbcTests.test_dict_subclass.<locals>.MyDictN)r4r5r6r-r-r-r.r>�sr>)	r1r�r^rErQrr/r�r0)r(r>rfr-r-r.�test_dict_subclass�sz&CollectionsAbcTests.test_dict_subclasscCsV|�tt���tj�|�ttjttf��tj�|�ttjtt	f��tj�dS)N)
r[rHr1rAr��defaultdictrrr^rE)r(r-r-r.�test_defaultdict_instantiation�sz2CollectionsAbcTests.test_defaultdict_instantiationcCsLGdd�dtjttf�}|�}|�||�|�|tj�|�tj|�dS)Nc@seZdZdS)z@CollectionsAbcTests.test_defaultdict_subclass.<locals>.MyDefDictN)r4r5r6r-r-r-r.�	MyDefDict�sr8)	r1rAr^rErQr/r�r6r0)r(r8�ddr-r-r.�test_defaultdict_subclass�s
z-CollectionsAbcTests.test_defaultdict_subclasscCsV|�tt���tj�|�ttjttf��tj�|�ttjttf��tj�dS)N)	r[rHr1�OrderedDictr�rrr^rE)r(r-r-r.�test_ordereddict_instantiation�sz2CollectionsAbcTests.test_ordereddict_instantiationcCsLGdd�dtjttf�}|�}|�||�|�|tj�|�tj|�dS)Nc@seZdZdS)z@CollectionsAbcTests.test_ordereddict_subclass.<locals>.MyOrdDictN)r4r5r6r-r-r-r.�	MyOrdDict�sr=)r1r;r^rErQr/r�r0)r(r=Zodr-r-r.�test_ordereddict_subclass�s
z-CollectionsAbcTests.test_ordereddict_subclass)rrzChainMap was added in 3.3cCs�|�tt���tj�|�ttjttf��tj�|�ttjttf��tj�Gdd�dtjttf�}|�t|ttf��|�dS)Nc@seZdZdS)z;CollectionsAbcTests.test_chainmap_instantiation.<locals>.CMN)r4r5r6r-r-r-r.�CM�sr?)	r[rHr1rBr�rrr^rE)r(r?r-r-r.�test_chainmap_instantiation�s
z/CollectionsAbcTests.test_chainmap_instantiationcCsLGdd�dtjttf�}|�}|�||�|�|tj�|�tj|�dS)Nc@seZdZdS)z>CollectionsAbcTests.test_chainmap_subclass.<locals>.MyChainMapN)r4r5r6r-r-r-r.�
MyChainMap�srA)r1rBr^rErQr/r�r0)r(rA�cmr-r-r.�test_chainmap_subclass�s
z*CollectionsAbcTests.test_chainmap_subclasscCsz|�tt���tj�|�ttjt��tj�|�ttjt��tj�Gdd�dtjt�}|�t|t��|�dS)Nc@seZdZdS)z7CollectionsAbcTests.test_deque_instantiation.<locals>.DN)r4r5r6r-r-r-r.r��sr�)r[rHr1r*r�r)r
rE)r(r�r-r-r.�test_deque_instantiation�s
z,CollectionsAbcTests.test_deque_instantiationcCsz|�tt���tj�|�ttjt��tj�|�ttjt��tj�Gdd�dtjt�}|�t|t��|�dS)Nc@seZdZdS)z9CollectionsAbcTests.test_counter_instantiation.<locals>.CN)r4r5r6r-r-r-r.r��sr�)r[rHr1r,r�r
rE)r(r�r-r-r.�test_counter_instantiation�s
z.CollectionsAbcTests.test_counter_instantiationcCsHGdd�dtjt�}|�}|�||�|�|tj�|�|tj�dS)Nc@seZdZdS)zJCollectionsAbcTests.test_counter_subclass_instantiation.<locals>.MyCounterN)r4r5r6r-r-r-r.�	MyCounter�srF)r1r,rErQr�)r(rFrfr-r-r.�#test_counter_subclass_instantiation�s
z7CollectionsAbcTests.test_counter_subclass_instantiationc	Csf|�t��t��WdQRX|�t��tjt�WdQRX|�t��tjt�WdQRXdS)N)r=r>r1r.r
rE)r(r-r-r.�test_no_set_instantiation�sz-CollectionsAbcTests.test_no_set_instantiationcCs,Gdd�dtjt�}|�}|�||�dS)Nc@seZdZdS)zBCollectionsAbcTests.test_set_subclass_instantiation.<locals>.MySetN)r4r5r6r-r-r-r.�MySet�srI)r1r.rErQ)r(rIrfr-r-r.�test_set_subclass_instantiation�sz3CollectionsAbcTests.test_set_subclass_instantiationc	Csf|�t��t��WdQRX|�t��tjt�WdQRX|�t��tjt�WdQRXdS)N)r=r>r1r"r
rE)r(r-r-r.�test_no_frozenset_instantiation�sz3CollectionsAbcTests.test_no_frozenset_instantiationcCs,Gdd�dtjt�}|�}|�||�dS)Nc@seZdZdS)zNCollectionsAbcTests.test_frozenset_subclass_instantiation.<locals>.MyFrozenSetN)r4r5r6r-r-r-r.�MyFrozenSet�srL)r1r"rErQ)r(rLrfr-r-r.�%test_frozenset_subclass_instantiation�sz9CollectionsAbcTests.test_frozenset_subclass_instantiationc	Cs`|�t��t�WdQRX|�t��tt�WdQRX|�t��tt�WdQRXdS)N)r=r>rr
rE)r(r-r-r.�test_no_tuple_instantiation	sz/CollectionsAbcTests.test_no_tuple_instantiationcCs$dd�}|�}|�t|�tj�dS)Ncss
dVdS)Nr<r-r-r-r-r.r�
	sz/CollectionsAbcTests.test_generator.<locals>.foo)r/rHr1�	Generator)r(r�r	r-r-r.�test_generator	sz"CollectionsAbcTests.test_generatorc	Csr|�t��t��WdQRX|�t��tjtttf�WdQRX|�t��tjtttf�WdQRXdS)N)r=r>r1rOr
rE)r(r-r-r.�test_no_generator_instantiation	sz3CollectionsAbcTests.test_no_generator_instantiationcCs2i}tdt�|�|d�}|�t|�tj�dS)Nzasync def f():
    yield 42
r2)rmr�r/rHr1�AsyncGenerator)r(r�r	r-r-r.�test_async_generator	s


z(CollectionsAbcTests.test_async_generatorc	Csn|�t��t��WdQRX|�t��tjttf�WdQRX|�t��tjttf�WdQRXdS)N)r=r>r1rRr
rE)r(r-r-r.�%test_no_async_generator_instantiation!	sz9CollectionsAbcTests.test_no_async_generator_instantiationc	Cs,Gdd�dtj�}|�t��|�WdQRXGdd�d|�}|�t|��d�|�|�tj�Gdd�dtjtt	f�}|�t|��d�|�t|t
t
f��d�|�t|tt	f��d�|�t|�|�t|�|�
|tj�|�
|tj�|�
|tj�|�|tt	f�tj�|�|tt	f�tjj�|�
|tjj�|�
|tjj�|�
|tjj�|�t��t|t
t
ftj�WdQRX|�
||�Gdd	�d	tj�}|�t|�Gd
d�dtjtttf�}dd
�}|�
|tj�|�
|tj�|�
|tjj�|�
|tjj�|�t|�|�dS)Nc@seZdZdS)z1CollectionsAbcTests.test_subclassing.<locals>.MMAN)r4r5r6r-r-r-r.�MMA+	srUc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)z1CollectionsAbcTests.test_subclassing.<locals>.MMCcSsdS)Nr-)r(rr-r-r.r�2	sz=CollectionsAbcTests.test_subclassing.<locals>.MMC.__getitem__cSsdS)Nr-)r(rr�r-r-r.r�4	sz=CollectionsAbcTests.test_subclassing.<locals>.MMC.__setitem__cSsdS)Nr-)r(rr-r-r.r6	sz=CollectionsAbcTests.test_subclassing.<locals>.MMC.__delitem__cSstd�S)Nr-)r)r(r-r-r.r8	sz:CollectionsAbcTests.test_subclassing.<locals>.MMC.__iter__cSsdS)Nrr-)r(r-r-r.r:	sz9CollectionsAbcTests.test_subclassing.<locals>.MMC.__len__N)r4r5r6r�r�rrrr-r-r-r.�MMC1	s
rVrc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)z1CollectionsAbcTests.test_subclassing.<locals>.MMBcSsdS)Nr-)r(rr-r-r.r�B	sz=CollectionsAbcTests.test_subclassing.<locals>.MMB.__getitem__cSsdS)Nr-)r(rr�r-r-r.r�D	sz=CollectionsAbcTests.test_subclassing.<locals>.MMB.__setitem__cSsdS)Nr-)r(rr-r-r.rF	sz=CollectionsAbcTests.test_subclassing.<locals>.MMB.__delitem__cSstd�S)Nr-)r)r(r-r-r.rH	sz:CollectionsAbcTests.test_subclassing.<locals>.MMB.__iter__cSsdS)Nrr-)r(r-r-r.rJ	sz9CollectionsAbcTests.test_subclassing.<locals>.MMB.__len__N)r4r5r6r�r�rrrr-r-r-r.�MMBA	s
rWc@seZdZdS)z/CollectionsAbcTests.test_subclassing.<locals>.IN)r4r5r6r-r-r-r.�Ic	srXc@seZdZdS)z/CollectionsAbcTests.test_subclassing.<locals>.GN)r4r5r6r-r-r-r.rxf	srxcss
dVdS)Nrr-r-r-r-r.r	g	r�z/CollectionsAbcTests.test_subclassing.<locals>.g)r1rr=r>rBr�rQr�rrr^r0r�r/r�r�r&r�r�rOrErH)r(rUrVrWrXrxr	r-r-r.�test_subclassing)	s@z$CollectionsAbcTests.test_subclassingcCs�Gdd�dtjttf�}i}tdt�|�|d}|�|tj�|�|tj�|�|tjj�|�|tjj�|�	t
|�|�|�}|�|tj�|�|tj�|�|tjj�|�|tjj�|�t
|�|�|�||�dS)Nc@seZdZdd�Zddd�ZdS)z?CollectionsAbcTests.test_subclassing_async_generator.<locals>.GcSsdS)Nr-)r(r�r-r-r.�asendp	szECollectionsAbcTests.test_subclassing_async_generator.<locals>.G.asendNcSsdS)Nr-)r(�typ�val�tbr-r-r.�athrowr	szFCollectionsAbcTests.test_subclassing_async_generator.<locals>.G.athrow)NN)r4r5r6rZr^r-r-r-r.rxo	srxzasync def g(): yield 0r	)
r1rRrErmr�r/rr�r�r0rHrQr�)r(rxr�r	�instancer-r-r.� test_subclassing_async_generatorn	s z4CollectionsAbcTests.test_subclassing_async_generatorcCsfGdd�dtj�}Gdd�d|�}Gdd�d�}Gdd�d�}|�||�|�||�|�||�dS)	Nc@seZdZedd��ZdS)z?CollectionsAbcTests.test_subclassing_subclasshook.<locals>.BasecSs|jdkrdSdSdS)N�FooTF)r4)r)r�r-r-r.�__subclasshook__�	s
zPCollectionsAbcTests.test_subclassing_subclasshook.<locals>.Base.__subclasshook__N)r4r5r6�classmethodrbr-r-r-r.r&�	sr&c@seZdZdS)z<CollectionsAbcTests.test_subclassing_subclasshook.<locals>.CN)r4r5r6r-r-r-r.r��	sr�c@seZdZdS)z>CollectionsAbcTests.test_subclassing_subclasshook.<locals>.FooN)r4r5r6r-r-r-r.ra�	srac@seZdZdS)z>CollectionsAbcTests.test_subclassing_subclasshook.<locals>.BarN)r4r5r6r-r-r-r.�Bar�	srd)r1r�r/r0)r(r&r�rardr-r-r.�test_subclassing_subclasshook�	sz1CollectionsAbcTests.test_subclassing_subclasshookcCs�Gdd�dtj�}Gdd�d|�}Gdd�d�}|�|�|�||�|�||�Gdd�d�}|�|�|�||�|�||�Gd	d
�d
�}tjj�|�|�|tj�dS)Nc@seZdZdS)z8CollectionsAbcTests.test_subclassing_register.<locals>.AN)r4r5r6r-r-r-r.rG�	srGc@seZdZdS)z8CollectionsAbcTests.test_subclassing_register.<locals>.BN)r4r5r6r-r-r-r.r��	sr�c@seZdZdS)z8CollectionsAbcTests.test_subclassing_register.<locals>.CN)r4r5r6r-r-r-r.r��	sr�c@seZdZdS)z8CollectionsAbcTests.test_subclassing_register.<locals>.DN)r4r5r6r-r-r-r.r��	sr�c@seZdZdS)z8CollectionsAbcTests.test_subclassing_register.<locals>.MN)r4r5r6r-r-r-r.r��	sr�)	r1rr�r/r0r�r�rr�)r(rGr�r�r�r�r-r-r.�test_subclassing_register�	s

z-CollectionsAbcTests.test_subclassing_registercCs�Gdd�dtjj�}|�|tj�|�|tj�Gdd�dtjj�}|�|tj�|�|tj�Gdd�dtjj�}|�|tj�Gdd�dtjjtjd	�}Gd
d�d�}|�|�|�|tj�dS)Nc@seZdZdS)z7CollectionsAbcTests.test_collections_as_base.<locals>.MN)r4r5r6r-r-r-r.r��	sr�c@seZdZdS)z7CollectionsAbcTests.test_collections_as_base.<locals>.SN)r4r5r6r-r-r-r.r��	sr�c@seZdZdS)z7CollectionsAbcTests.test_collections_as_base.<locals>.IN)r4r5r6r-r-r-r.rX�	srXc@seZdZdS)z7CollectionsAbcTests.test_collections_as_base.<locals>.AN)r4r5r6r-r-r-r.rG�	srG)�	metaclassc@seZdZdS)z7CollectionsAbcTests.test_collections_as_base.<locals>.BN)r4r5r6r-r-r-r.r��	sr�)	r�r�r�r/r1r�r"�ABCMetar�)r(r�r�rXrGr�r-r-r.�test_collections_as_base�	s
z,CollectionsAbcTests.test_collections_as_baseN)9r4r5r6rrrr�ASYNCIOr
r
rrrrrrrrr r!r#r&r'r+r-r/r0r�r1r3r4r5r7r:r<r>r#r$r@rCrDrErGrHrJrKrMrNrPrQrSrTrYr`rerfrir-r-r-r.r�sd

Erc@s&eZdZdd�Zeed�dd��ZdS)�
OtherABCTestscCs4tjdd��}|�}|�|tj�|�dtj�dS)Ncss
dVdS)Nr<r-r-r-r-r.�manager�	sz2OtherABCTests.test_contextmanager.<locals>.managerr<)�
contextlib�contextmanagerrQr1�ContextManagerr�)r(rlrBr-r-r.�test_contextmanager�	sz!OtherABCTests.test_contextmanagerzPython 3.5 requiredc	Cs�Gdd�d�}|�t�tj�|�|�tj�tjdd��}|�}|�|tj�|�tjtj	tf�|�
t��tdtjt�WdQRX|�
t��tjtt
fWdQRXdS)Nc@seZdZdS)z7OtherABCTests.test_async_contextmanager.<locals>.NotACMN)r4r5r6r-r-r-r.�NotACM�	srqcss
dVdS)Nr<r-r-r-r-r.rl�	sz8OtherABCTests.test_async_contextmanager.<locals>.managerr<)rQ�ACMr1r�r�rmrnrBrErYr=r>r?r^)r(rqrlrBr-r-r.�test_async_contextmanager�	sz'OtherABCTests.test_async_contextmanagerN)r4r5r6rprrjrsr-r-r-r.rk�	s	rkc@s$eZdZdd�Zdd�Zdd�ZdS)�	TypeTestscCsNGdd�d�}Gdd�d|�}Gdd�d|�}t||d�dd	�}||�dS)
Nc@seZdZdS)z'TypeTests.test_type_basic.<locals>.UserN)r4r5r6r-r-r-r.�User�	sruc@seZdZdS)z,TypeTests.test_type_basic.<locals>.BasicUserN)r4r5r6r-r-r-r.�	BasicUser�	srvc@seZdZdS)z*TypeTests.test_type_basic.<locals>.ProUserN)r4r5r6r-r-r-r.�ProUser�	srw)�
user_classr�cSs|�S)Nr-)rxr-r-r.�new_user�	sz+TypeTests.test_type_basic.<locals>.new_user)r)r(rurvrwryr-r-r.�test_type_basic�	s
zTypeTests.test_type_basiccCsZGdd�d�}Gdd�d|�}Gdd�d|�}td|d�}t||d	�d
d�}||�dS)Nc@seZdZdS)z)TypeTests.test_type_typevar.<locals>.UserN)r4r5r6r-r-r-r.ru�	sruc@seZdZdS)z.TypeTests.test_type_typevar.<locals>.BasicUserN)r4r5r6r-r-r-r.rv�	srvc@seZdZdS)z,TypeTests.test_type_typevar.<locals>.ProUserN)r4r5r6r-r-r-r.rw�	srwr�)rj)rxr�cSs|�S)Nr-)rxr-r-r.ry�	sz-TypeTests.test_type_typevar.<locals>.new_user)rr)r(rurvrwr�ryr-r-r.�test_type_typevar�	szTypeTests.test_type_typevarcCs$ttt}|ttd�dd�}dS)N)r�r�cSs|dkrdS|�SdS)Nr-)r�r-r-r.r��	sz)TypeTests.test_type_optional.<locals>.foo)rr�
BaseException)r(rGr�r-r-r.�test_type_optional�	szTypeTests.test_type_optionalN)r4r5r6rzr{r}r-r-r-r.rt�	s
rtc@seZdZdd�Zdd�ZdS)�NewTypeTestscCsLtdt�}tdt�}|�|d�t�|�|d�t�|�|d�dd�dS)N�UserId�UserName��Joer��)rrEr^rQrB)r(rr�r-r-r.�
test_basic
s


zNewTypeTests.test_basicc	Cs^tdt�}tdt�}|�t��t|t�WdQRX|�t��Gdd�d|�}WdQRXdS)Nrr�c@seZdZdS)z#NewTypeTests.test_errors.<locals>.DN)r4r5r6r-r-r-r.r�
sr�)rrEr^r=r>r&)r(rr�r�r-r-r.rF
s

zNewTypeTests.test_errorsN)r4r5r6r�rFr-r-r-r.r~
sr~c@sdeZdZGdd�de�Zdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dS)�NamedTupleTestsc@seZdZUeed<eed<dS)zNamedTupleTests.NestedEmployeer�r�N)r4r5r6r^r�rEr-r-r-r.�NestedEmployee
s
r�cCs�tddtfdtfg�}|�|t�|dd�}|ddd�}|�||�|�|t�|�|jd�|�|jd�|�|jd�|�|jd�|�|j	d�|�|j
d�|�|jt�
dtfdtfg��|�|j|j�dS)	N�Empr��idr�r<ZJimr�)r�r�)rr^rEr/r�rQrBr�r�r4�_fieldsr�r�r;r[�_field_types)r(r�ZjoeZjimr-r-r.rt
s
zNamedTupleTests.test_basicsc	Cs`tjdd�dkr\|�t��tdttd�WdQRX|�t��Gdd�dt�}WdQRXdS)Nr�)rr��Name)Zoner�c@seZdZdZdS)z9NamedTupleTests.test_namedtuple_pyversion.<locals>.NotYetrN)r4r5r6r\r-r-r-r.�NotYet0
sr�)r#r$r=r>rrEr^)r(r�r-r-r.�test_namedtuple_pyversion+
s
z)NamedTupleTests.test_namedtuple_pyversioncCs�tdd�}|�|t�|�|t�|�|jd�|�|jd�|�tjd�|�tjd�|�tjt	j
ttd��|�
tjtj�dS)NZTimi(#r�)r�r�)r�rQr�rBr�r�r4r�r�r�r;r^rEr[r�)r(Ztimr-r-r.�test_annotation_usage3
s
z%NamedTupleTests.test_annotation_usagec	Cs�td�}|�|t�|�|t�|�|jd�|�|jd�tdd�}|�|jd�|�tjd�|�tjd�|�tjt	t
td��|�tjt	dd��|�
t��td�WdQRXdS)	NZJellerZSjoerdr�r�)r�r�)r�zE
class NonDefaultAfterDefault(NamedTuple):
    x: int = 3
    y: int
)r�rQr�rBr�r�r4r�r�r�r^rE�_field_defaultsr=r>rm)r(ZjelleZcooler_employeer-r-r.�"test_annotation_usage_with_default?
s
z2NamedTupleTests.test_annotation_usage_with_defaultc	Cs�|�td���d�|�td�jtd�d�|�ttd��d�|�tdd�td�d�|�t��td�WdQRX|�t��td�WdQRXdS)	Nr�r�r<rz42 -> 1rzc
class XMethBad(NamedTuple):
    x: int
    def _fields(self):
        return 'no chance for this'
zl
class XMethBad2(NamedTuple):
    x: int
    def _source(self):
        return 'no chance for this as well'
)	rBr�r�r�r^r�r=r�rm)r(r-r-r.�"test_annotation_usage_with_methodsT
sz2NamedTupleTests.test_annotation_usage_with_methodsc	Cs�tdttd�}|dd�}|�|t�|�|jd�|�|jd�|�|jd�|�|j	t
ttd��|�|j|j	�|�
t��tddtfgtd�WdQRX|�
t��tddd	d
�WdQRXdS)N�
LocalEmployee)r�ZageZNick�r�r�)r�r�r�)r�r�)rr^rErQr�rBr�r4r�r�r�r[r�r=r>)r(r�Znickr-r-r.�test_namedtuple_keyword_usagej
s
z-NamedTupleTests.test_namedtuple_keyword_usagecCs�tdttttd�}|�|jd�|�|jd�|tdddtfgd�}|�|j	t�|�|j
d�|�|jd�|�|jdtfg�dS)N�NT)r)r(�typename�fieldsr<r�r�)
rrHrvr^r�rBr4r�r�r)r(r�r�)r(r�r�r-r-r.�%test_namedtuple_special_keyword_namesx
sz5NamedTupleTests.test_namedtuple_special_keyword_namesc	Cs�|�t��t��WdQRX|�t��t�WdQRX|�t��tddtfgd�WdQRX|�t��tddtfg�WdQRXtdttd�}|�|jd�|�|j	d�tddtfdtfgd�}|�|jd�|�|j	d�dS)Nr�r��_name)r�r�r�)r�r�r�)r�)
r=r>rrr^rprErBr4r�)r(r�r-r-r.�test_namedtuple_errors�
sz&NamedTupleTests.test_namedtuple_errorsc
Cs�tddtfdtfg�ax�tt|jfD]�}|j|d���|dd�}xDttj	d�D]2}t�
||�}t�|�}|�||�|�
||�qPWt|�}|�||�|�
||�t|�}|�||�|�
||�WdQRXq$WdS)Nr�r�r�)r)�jane�%r�)rr^rEr�r�r�ZsubTestrIrJrKrLrMrBrQrr)r(r)r�rOr�Zjane2r-r-r.�test_copy_and_pickle�
s

z$NamedTupleTests.test_copy_and_pickleN)r4r5r6rr�rtr�r�r�r�r�r�r�r�r-r-r-r.r�
s
r�c@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�IOTestscCs.ttd�dd�}|jd}|�|jtf�dS)N)r�r�cSs|��S)N)�readline)r�r-r-r.r��
szIOTests.test_io.<locals>.stuffr�)rrr�rBrZ)r(r�r�r-r-r.�test_io�
s
zIOTests.test_iocCs,ttd�dd�}|jd}|�|jd�dS)N)r�r�cSs|��S)N)r�)r�r-r-r.r��
sz"IOTests.test_textio.<locals>.stuffr�r-)r r^r�rBrZ)r(r�r�r-r-r.�test_textio�
s
zIOTests.test_textiocCs,ttd�dd�}|jd}|�|jd�dS)N)r�r�cSs|��S)N)r�)r�r-r-r.r��
sz$IOTests.test_binaryio.<locals>.stuffr�r-)r!r_r�rBrZ)r(r�r�r-r-r.�
test_binaryio�
s
zIOTests.test_binaryiocCspddlm}m}m}m}m}|�|tj�|�|tj�|�|tj�|�t	|�t	dddg��|�|d�dS)Nr)rr r!rFr4rr r!z	typing.io)
Z	typing.iorr r!rFr4r[r1rBrs)r(rr r!rFr4r-r-r.�test_io_submodule�
szIOTests.test_io_submoduleN)r4r5r6r�r�r�r�r-r-r-r.r��
sr�c@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�RETestscCs�t�dtj�}|�|jt�|�t|�t�|�|t�|�d�}|�|jt	�|�t|�t	�|�|t	�tt
ttft	t
ttfdS)Nz[a-z]+z12345abcde.....)
r]�compilerXr/r�r"rHrQ�searchr#rr^r_)r(ZpatZmatr-r-r.rt�
s
zRETests.test_basicscCsP|�tttt�|�tttt�|�tttt�|�ttt�dS)N)rBr"r^rXr_r#)r(r-r-r.�test_alias_equality�
szRETests.test_alias_equalityc	Cs~ttttf}|�t��|tWdQRX|�t��tdtt�WdQRX|�t��ttttt�WdQRXdS)Nr<)	r#rr^r_r=r>r?r"r&)r(�mr-r-r.rF�
szRETests.test_errorscCst|�tt�d�|�ttt�d�|�ttt�d�|�tt�d�|�ttt�d�|�ttt�d�dS)Nztyping.Patternztyping.Pattern[str]ztyping.Pattern[bytes]ztyping.Matchztyping.Match[str]ztyping.Match[bytes])rBrCr"r^r_r#)r(r-r-r.rD�
szRETests.test_reprcCs\ddlm}m}m}m}|�|tj�|�|tj�|�t|�tddg��|�|d�dS)Nr)r#r"rFr4r#r"z	typing.re)	Z	typing.rer#r"rFr4r[r1rBrs)r(r#r"rFr4r-r-r.�test_re_submodule�
s
zRETests.test_re_submodulec	Cs>|�t��}Gdd�dtj�}WdQRX|�t|j�d�dS)Nc@seZdZdS)z'RETests.test_cannot_subclass.<locals>.AN)r4r5r6r-r-r-r.rGsrGz.type 're.Match' is not an acceptable base type)r=r>r1r#rBr^Z	exception)r(ZexrGr-r-r.rI�
szRETests.test_cannot_subclassN)	r4r5r6rtr�rFrDr�rIr-r-r-r.r��
sr�c@seZdZdd�Zdd�ZdS)�AllTestscCs�ddlm}|�d|�|�d|�|�d|�|�d|�ttd�rR|�d|�|�d	|�|�d
|�|�d|�|�d|�|�d
|�|�d|�|�d|�dS)Nr)rFrN�
ValuesViewrr��AbstractContextManagerro�ior]�osr#ZTextr�r�)r1rFr~rrmr�)r(r�r-r-r.�test_alls
zAllTests.test_allcs>ddl�t�j����fdd�t����D�}|�|��dS)Nrcsnh|]f\}}|�ksf|�d�s|�jjkr|�jjkr|dkr|�d�s|��|kst|dd��jkr|�qS)�_>r�r])rZ_contraZ_cor5N)�
startswithr�rFr]r��upperrDr4)rrr�)�
actual_allr1r-r.�	<setcomp>$s

z3AllTests.test_all_exported_names.<locals>.<setcomp>)r1rsrF�varsrZassertSetEqual)r(Zcomputed_allr-)r�r1r.�test_all_exported_names s

z AllTests.test_all_exported_namesN)r4r5r6r�r�r-r-r-r.r�sr��__main__)hrmr�rJr]r#Zunittestrrrrrrrr1r	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r�r^Ztestr$r%r7r8r9r:r;rLrPrrr�r�r^r_r�r�r�r�r�r�r�r�r�r�Z
ASYNCIO_TESTSrmr�rjr�r�r�r�rGr�r�rxr�r�r�r�r�r�rEr�rrrr�er�r�r�rrkrtr~r�r�r�r�r4r-r-r-r.�<module>s�*"Y)N94(F=
gU'#<1