HEX
Server: Apache
System: Linux bd12.noc223.com 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: handcraf (1693)
PHP: 8.1.28
Disabled: NONE
Upload Files
File: //opt/alt/python312/lib64/python3.12/test/test_dataclasses/__pycache__/__init__.cpython-312.pyc
�

h�er:��L�ddl�ddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddlm
Z
mZmZmZmZmZmZmZmZmZmZddlmZddlmZmZmZmZddlmZddlZddlZGd�d	e �Z!Gd
�de	jD�Z"Gd�d
e	jD�Z#Gd�de	jD�Z$Gd�de	jD�Z%Gd�de	jD�Z&Gd�de	jD�Z'Gd�de	jD�Z(Gd�de	jD�Z)Gd�de	jD�Z*Gd�de	jD�Z+Gd�de	jD�Z,Gd �d!e	jD�Z-e.d"d#e/fg�Z0e.d$d#e/fge1�%�Z2e.d&d#e/fg�Z3e.d'd#e/fgd(�%�Z4Gd)�d*e	jD�Z5Gd+�d,e	jD�Z6Gd-�d.e	jD�Z7Gd/�d0e	jD�Z8Gd1�d2e	jD�Z9e1d3k(re	jt�yy)4�)�*N)�Mock)�ClassVar�Any�List�Union�Tuple�Dict�Generic�TypeVar�Optional�Protocol�DefaultDict)�get_type_hints)�deque�OrderedDict�
namedtuple�defaultdict)�total_orderingc��eZdZy)�CustomErrorN��__name__�
__module__�__qualname__���E/opt/alt/python312/lib64/python3.12/test/test_dataclasses/__init__.pyrr��rrc��eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d(�Z*d)�Z+d*�Z,d+�Z-d,�Z.d-�Z/d.�Z0d/�Z1d0�Z2d1�Z3d2�Z4d3�Z5d4�Z6d5�Z7d6�Z8d7�Z9d8�Z:d9�Z;d:�Z<d;�Z=d<�Z>d=�Z?d>�Z@d?�ZAd@�ZBdA�ZCdB�ZDdC�ZEdD�ZFdE�ZGdF�ZHdG�ZIdH�ZJdI�ZKdJ�ZLdK�ZMdL�ZNdM�ZOdN�ZPdO�ZQdP�ZRdQ�ZSdR�ZTdS�ZUdT�ZVdU�ZWdV�ZXdW�ZYdX�ZZdY�Z[dZ�Z\d[�Z]d\�Z^d]�Z_d^�Z`d_�Zad`�Zbda�Zcdb�Zddc�Zedd�Zfde�Zgdf�Zhdg�Zidh�Zjdi�Zkdj�Zlyk)l�TestCasec��tGd�d��}|�}|jtt|��d�y)Nc��eZdZy)�"TestCase.test_no_fields.<locals>.CNrrrr�Cr$���rr%r��	dataclass�assertEqual�len�fields��selfr%�os   r�test_no_fieldszTestCase.test_no_fieldss:��	�	�	�
�	�
�C������V�A�Y���+rc��tGd�d��}|�}|jtt|��d�y)Nc��eZdZdZy)�6TestCase.test_no_fields_but_member_variable.<locals>.CrN)rrr�irrrr%r2&s���Arr%rr'r,s   r�"test_no_fields_but_member_variablez+TestCase.test_no_fields_but_member_variable%s:��	�	�	�
�	�
�C������V�A�Y���+rc�r�tGd�d��}|d�}|j|jd�y)Nc��eZdZUeed<y)�-TestCase.test_one_field_no_default.<locals>.C�xN�rrr�int�__annotations__rrrr%r7.����Frr%�*�r(r)r8r,s   r�test_one_field_no_defaultz"TestCase.test_one_field_no_default-s8��	�	�	�
�	�
�b�E��������b�!rc��d}|jt|�5tGd�d��}ddd�y#1swYyxYw)Nz/cannot specify both default and default_factoryc�,�eZdZUede��Zeed<y)�<TestCase.test_field_default_default_factory_error.<locals>.C���default�default_factoryr8N)rrr�fieldr:r8r;rrrr%rB8s���q�#�>��3�>rr%)�assertRaisesRegex�
ValueErrorr()r-�msgr%s   r�(test_field_default_default_factory_errorz1TestCase.test_field_default_default_factory_error5sC��?��
�
#�
#�J��
4�	?�
�
?�
?��
?�	?�	?�	?�s�6�?c��tddd��}d|_t|�}dt�dt�d�}|j	||�y)	NrCTF)rE�init�repr�idz4Field(name='id',type=None,default=1,default_factory=zO,init=True,repr=False,hash=None,compare=True,metadata=mappingproxy({}),kw_only=z,_field_type=None))rG�namerN�MISSINGr))r-�	int_field�repr_output�expected_outputs    r�test_field_reprzTestCase.test_field_repr<sU���!�$�U�;�	��	���9�o��8�8?�{�C&�'.�[�1/�	/��	
����o�6rc�n�t�}||_d|_t|�}|j	d|�y)NrO�
,type=...,)rG�typerPrN�assertIn)r-�	rec_fieldrSs   r�test_field_recursive_reprz"TestCase.test_field_recursive_reprIs.���G�	�"�	���	���9�o���
�
�l�K�0rc��Gd�d�}tGd�d��}|jdt|jd��y)Nc��eZdZy)�-TestCase.test_recursive_annotation.<locals>.CNrrrrr%r^R���rr%c�&�eZdZUe�Zeed<y)�-TestCase.test_recursive_annotation.<locals>.Dr%N)rrrrGr%r;rrr�DraUs
���7�A�q�NrrbrW)r(rYrN�__dataclass_fields__�r-r%rbs   r�test_recursive_annotationz"TestCase.test_recursive_annotationQsE��	�	�
�	�	�
�	�	
�
�
�l�D��)?�)?��)D�$E�Frc��tdd��Gd�d��}t|j�}d}|j||�y)NT)�slots�frozenc��eZdZy)�1TestCase.test_dataclass_params_repr.<locals>.SomeNrrrr�Somerj_���rrkz�_DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=True,match_args=True,kw_only=False,slots=True,weakref_slot=False))r(rN�__dataclass_params__r))r-rkrSrTs    r�test_dataclass_params_reprz#TestCase.test_dataclass_params_repr[sE��
��d�	+���
,���4�4�4�5��;��	
����o�6rc���tGd�d��}tjt�jD]/}|dk(r�	|j	t|j|�|���1y)Nc��eZdZy)�6TestCase.test_dataclass_params_signature.<locals>.SomeNrrrrrkrqmrlrrk�cls)rJ)r(�inspect�	signature�
parameters�
assertTrue�hasattrrm)r-rk�params   r�test_dataclass_params_signaturez(TestCase.test_dataclass_params_signatureis^��
���
���&�&�y�1�<�<�	R�E���~���O�O�G�D�$=�$=�u�E�5�O�Q�	Rrc�t�tGd�d��}|d��}|j|jd�y)Nc��eZdZUeed<y)�*TestCase.test_named_init_params.<locals>.Cr8Nr9rrrr%r|vr<rr%� �r8r>r,s   r�test_named_init_paramszTestCase.test_named_init_paramsus8��	�	�	�
�	�
��G��������b�!rc�N�tGd�d��}|d�}|j|j|jfd�|j	t
d�5tGd�d��}ddd�|j	t
d�5tGd�d��}tGd	�d|��}ddd�|j	t
d�5tGd
�d��}tGd�d|��}ddd�y#1swY��xYw#1swY�\xYw#1swYyxYw)Nc�&�eZdZUeed<dZeed<y)�/TestCase.test_two_fields_one_default.<locals>.Cr8r�yN�rrrr:r;r�rrrr%r�~����F��A�s�Jrr%�)r�rz1non-default argument 'y' follows default argumentc�&�eZdZUdZeed<eed<y)r�rr8r�N�rrrr8r:r;rrrr%z/TestCase.test_two_fields_one_default.<locals>.C�s����3�
��rc��eZdZUdZeed<y)�/TestCase.test_two_fields_one_default.<locals>.Brr8Nr�rrr�Br�������3�
rr�c��eZdZUeed<y)r�r�Nr9rrrr%z/TestCase.test_two_fields_one_default.<locals>.C�����rc�"�eZdZUeed<eed<y)r�r8r�Nr9rrrr�z/TestCase.test_two_fields_one_default.<locals>.B�s�����rc��eZdZUdZeed<y)r�rr8Nr�rrrr%z/TestCase.test_two_fields_one_default.<locals>.C�r�r)r(r)r8r�rH�	TypeError)r-r%r.r�s    r�test_two_fields_one_defaultz$TestCase.test_two_fields_one_default}sJ��	�	�	�
�	�
�a�D�����!�#�#�q�s�s��V�,��
#�
#�I�%7�8�	��
�
��
�		��
#�
#�I�%7�8�		��
�
��
��
�A�
��
�		��
#�
#�I�%7�8�
	��
�
��
��
�A�
��
�
	�
	�-	�	��		�		��
	�
	�s$�D�(D�(D�D�D�D$c��td��Gd�d��}|jt|d��d�td��Gd�d��}|jt|d��td��|jtd	�5td�
�Gd�d��}ddd�td�
�Gd�d��}|jt|d
��td��|jtd	�5td�
�Gd�d��}ddd�y#1swY��xYw#1swYyxYw)NT�rhc��eZdZUeed<d�Zy)�'TestCase.test_overwrite_hash.<locals>.Cr8c��y�N�-r�r-s r�__hash__z0TestCase.test_overwrite_hash.<locals>.C.__hash__����rN)rrrr:r;r�rrrr%r������F�
rr%�dr�c��eZdZUeed<d�Zy)r�r8c��y�NFr�r-�others  r�__eq__z.TestCase.test_overwrite_hash.<locals>.C.__eq__����rN�rrrr:r;r�rrrr%z'TestCase.test_overwrite_hash.<locals>.C�����F�
r)r��#Cannot overwrite attribute __hash__��unsafe_hashc��eZdZd�Zy)r�c��y�Nrr�s rr�z0TestCase.test_overwrite_hash.<locals>.C.__hash__����rN�rrrr�rrrr%z'TestCase.test_overwrite_hash.<locals>.C�s��rc��eZdZUeed<d�Zy)r�r8c��yr�rr�s rr�z.TestCase.test_overwrite_hash.<locals>.C.__eq__����rNr�rrrr%z'TestCase.test_overwrite_hash.<locals>.C�s���F�
r�
)r�c�$�eZdZUeed<d�Zd�Zy)r�r8c��yr�rr�s rr�z.TestCase.test_overwrite_hash.<locals>.C.__eq__�r�rc��yr�rr�s rr�z0TestCase.test_overwrite_hash.<locals>.C.__hash__�r�rN)rrrr:r;r�r�rrrr%z'TestCase.test_overwrite_hash.<locals>.C�s�����r)r(r)�hashrHr��r-r%s  r�test_overwrite_hashzTestCase.test_overwrite_hash�sE��
�$�	�	�	�
 �	�	
����a��f��s�+�
�$�	�	�	�
 �	�	
����a��f��t�F�|�4��
#�
#�I�$I�K�	�
�4�
(�
�
�)�
�	�
�t�	$�	�	�
%�	�
	
����a��e��d�5�k�2�
�
#�
#�I�$I�K�	�
�4�
(�
�
�)�
�	�	�-	�	��,	�	�s�D2�D>�2D;�>Ec�"�tGd�d��}tGd�d|��}|�}|jt|�d�|�}|jt|�d�|d��}|jt|�d	�y)
Nc�*�eZdZUdZeed<dZeed<y)�=TestCase.test_overwrite_fields_in_derived_class.<locals>.Baseg.@r8rr�N)rrrr8rr;r�r:rrr�Baser��s���A�s�M��A�s�Jrr�c�*�eZdZUdZeed<dZeed<y)�;TestCase.test_overwrite_fields_in_derived_class.<locals>.C1r��z�r8N)rrrr�r:r;r8rrr�C1r��s���A�s�K��A�s�Krr�zJTestCase.test_overwrite_fields_in_derived_class.<locals>.Base(x=15.0, y=0)zLTestCase.test_overwrite_fields_in_derived_class.<locals>.C1(x=15, y=0, z=10)�r~zKTestCase.test_overwrite_fields_in_derived_class.<locals>.C1(x=5, y=0, z=10)�r(r)rN)r-r�r�r.s    r�&test_overwrite_fields_in_derived_classz/TestCase.test_overwrite_fields_in_derived_class�s���
�	�	�
�	�
�	��	�
�	�
�F������a��"n�o��D������a��"p�q���G������a��"o�prc���tGd�d��}|d�}|j|jd�tj|j
�}t
t|j��}|jd|�tGd�d��}tj|j
�}t
t|j��}|jd|�y)Nc��eZdZUeed<y)�)TestCase.test_field_named_self.<locals>.Cr-N�rrr�strr;rrrr%r��s���Irr%�foor-c��eZdZUeed<y)r��selfxNr�rrrr%z)TestCase.test_field_named_self.<locals>.C����Jr)
r(r)r-rsrt�__init__�next�iterru�assertNotEqual)r-r%�c�sig�firsts     r�test_field_named_selfzTestCase.test_field_named_self�s���	�	�	�
�	�
�E�(���������'�����
�
�+���T�#�.�.�)�*�����F�E�*�
�	�	�
�	�����
�
�+���T�#�.�.�)�*�������'rc�r�tGd�d��}|d�}|j|jd�y)Nc��eZdZUeed<y)�+TestCase.test_field_named_object.<locals>.C�objectNr�rrrr%r�����Krr%r��r(r)r��r-r%r�s   r�test_field_named_objectz TestCase.test_field_named_object
s6��	�	�	�
�	�
�e�H��������5�)rc�~�td��Gd�d��}|d�}|j|jd�y)NTr�c��eZdZUeed<y)�2TestCase.test_field_named_object_frozen.<locals>.Cr�Nr�rrrr%r�r�rr%r�r�r�s   r�test_field_named_object_frozenz'TestCase.test_field_named_object_frozens;��	�$�	�	�	�
 �	�
�e�H��������5�)rc�~�td��Gd�d��}|d�}|j|jd�y)NTr�c��eZdZUeed<y)�4TestCase.test_field_named_BUILTINS_frozen.<locals>.C�BUILTINSNr9rrrr%r�s���Mrr%r�)r(r)r�r�s   r� test_field_named_BUILTINS_frozenz)TestCase.test_field_named_BUILTINS_frozens;��	�$�	�	�	�
 �	�
�a�D��������Q�'rc��tGd�d��}|�tGd�d��}|d��jdk(sJ�y)Nc�J�eZdZUed���Zeed<ed���Zeed<y)�CTestCase.test_field_with_special_single_underscore_names.<locals>.Xc��y�N�orrrr�<lambda>zLTestCase.test_field_with_special_single_underscore_names.<locals>.X.<lambda>%��r�rFr8c��y)N��rrrrr�zLTestCase.test_field_with_special_single_underscore_names.<locals>.X.<lambda>&r�r�_dflt_xN)rrrrGr8r:r;r�rrr�Xr�#s ���;�7�A�s�7� ��=�G�S�=rr�c�:�eZdZUed���Zeed<dZeed<y)�CTestCase.test_field_with_special_single_underscore_names.<locals>.Yc��yr�rrrrr�zLTestCase.test_field_with_special_single_underscore_names.<locals>.Y.<lambda>,r�rr�r�r��_HAS_DEFAULT_FACTORYN)rrrrGr�r:r;r�rrr�Yr�*s���;�7�A�s�7�(+� �#�+rr�r��r�)r(r�)r-r�r�s   r�/test_field_with_special_single_underscore_namesz8TestCase.test_field_with_special_single_underscore_names sQ��
�	>�	>�
�	>�	
��	�	,�	,�
�	,��3�x�z�z�S� � � rc�0��hd��t�fd�tjj�D��}|D�cgc]
}|tf��}}td|�}||D�cgc]}|��c}�}|D]}|j
t||�|�� ycc}wcc}w)N>�None�True�Falsec3�L�K�|]}|jd�s|�vr|���y�w��__N��
startswith��.0�b�
exclusionss  �r�	<genexpr>z9TestCase.test_field_named_like_builtin.<locals>.<genexpr>6�,����� 
���<�<��%�!�:�*=�
� 
���!$r%��sorted�builtins�__dict__�keysr��make_dataclassr)�getattr�r-�builtins_namesrP�
attributesr%r�rs      @r�test_field_named_like_builtinz&TestCase.test_field_named_like_builtin1s����/�
�� 
��(�(�-�-�/� 
�
��/=�=�d�t�S�k�=�
�=��3�
�+��
��0���0�1��"�	5�D����W�Q��-�t�4�	5��>��1s�B�	Bc�4��hd��t�fd�tjj�D��}|D�cgc]
}|tf��}}td|d��}||D�cgc]}|��c}�}|D]}|j
t||�|�� ycc}wcc}w)N>r�r�r�c3�L�K�|]}|jd�s|�vr|���y�wrrrs  �rr	z@TestCase.test_field_named_like_builtin_frozen.<locals>.<genexpr>Hr
rr%Tr�rrs      @r�$test_field_named_like_builtin_frozenz-TestCase.test_field_named_like_builtin_frozenBs����
/�
�� 
��(�(�-�-�/� 
�
��/=�=�d�t�S�k�=�
�=��3�
�4�8��
��0���0�1��"�	5�D����W�Q��-�t�4�	5��>��1s�B�	Bc���tGd�d��}td��Gd�d��}||fD]�}|j|��5|j|�|��td�d	�d
�d�g�D]m\}}|j|��5|j	t
d
|j�d|j�d��5||�|��ddd�ddd��o	ddd���td��Gd�d��}|j|�|��|j|�|��y#1swY�pxYw#1swY��xYw#1swY��4xYw)Nc��eZdZy)�)TestCase.test_0_field_compare.<locals>.C0Nrrrr�C0rVr&rrF��orderc��eZdZy)�)TestCase.test_0_field_compare.<locals>.C1Nrrrrr�r!Zr&rr��rrc��||kSr�r��ars  rr�z/TestCase.test_0_field_compare.<locals>.<lambda>a�
��q�1�u�rc��||kSr�rr$s  rr�z/TestCase.test_0_field_compare.<locals>.<lambda>b�
��q�A�v�rc��||kDSr�rr$s  rr�z/TestCase.test_0_field_compare.<locals>.<lambda>cr&rc��||k\Sr�rr$s  rr�z/TestCase.test_0_field_compare.<locals>.<lambda>dr(r��idx�$not supported between instances of '�' and '�'Tc��eZdZy)�(TestCase.test_0_field_compare.<locals>.CNrrrrr%r1jr&rr%)	r(�subTestr)�	enumeraterHr�r�assertLessEqual�assertGreaterEqual�r-rr�rrr,�fnr%s       r�test_0_field_comparezTestCase.test_0_field_compareTsz��	�	�	�
�	�
��	�	�	�
 �	���8�
	-�C����#��&�	
-�� � �����.�(�*<�*=�*<�*=�*?� @�-�G�C�����#��.�-�!�3�3�I�6Z�[^�[g�[g�Zh�ho�ps�p|�p|�o}�}~�4�A�-��s�u�c�e�,�-�-�-�	-�	
-�	
-�
	-�
��	�	�	�
�	����Q�S�!�#�&������Q�S�)�-�-��-�-��
	
-�	
-�s=�AE�2E	�E�E	�
E�E�E	�E
�E�E%	c��tGd�d��}td��Gd�d��}||fD]�}|j|��5|j|d�|d��|j|d	�|d��t	d
�d�d�d
�g�D]o\}}|j|��5|jtd|j�d|j�d��5||d	�|d	��ddd�ddd��q	ddd���td��Gd�d��}|j|d	�|d��|j|d	�|d��|j|d�|d��|j|d�|d	��|j|d�|d	��|j|d�|d��y#1swY��xYw#1swY��axYw#1swY���xYw)Nc��eZdZUeed<y)�)TestCase.test_1_field_compare.<locals>.C0r8Nr9rrrrr;rr<rrFrc��eZdZUeed<y)�)TestCase.test_1_field_compare.<locals>.C1r8Nr9rrrr�r=vr<rr�r"rCrc��||kSr�rr$s  rr�z/TestCase.test_1_field_compare.<locals>.<lambda>~r&rc��||kSr�rr$s  rr�z/TestCase.test_1_field_compare.<locals>.<lambda>r(rc��||kDSr�rr$s  rr�z/TestCase.test_1_field_compare.<locals>.<lambda>�r&rc��||k\Sr�rr$s  rr�z/TestCase.test_1_field_compare.<locals>.<lambda>�r(rr+r-r.r/Tc��eZdZUeed<y)�(TestCase.test_1_field_compare.<locals>.Cr8Nr9rrrr%rC�r<rr%)r(r2r)r�r3rHr�r�
assertLessr4�
assertGreaterr5r6s       r�test_1_field_comparezTestCase.test_1_field_compareps��	�	�	�
�	�
��	�	�	�
 �	���8�	/�C����#��&�

/�� � ��Q���Q��0��#�#�C��F�C��F�3�(�*<�*=�*<�*=�*?� @�/�G�C�����#��.�/�!�3�3�I�6Z�[^�[g�[g�Zh�ho�ps�p|�p|�o}�}~�4�A�/��s�1�v�s�1�v�.�/�/�/�	/�

/�

/�	/�
��	�	�	�
�	�����!��a��d�#����Q�q�T�1�Q�4�(����Q�q�T�1�Q�4�(����1�Q�4��1��&�����!��a��d�+�����!��a��d�+�/�/��/�/��

/�

/�s=�A(G:�.2G-	� G!�6G-	�>
G:�!G*�&G-	�-G7
�2G:�:H	c���tGd�d��}td��Gd�d��}||fD�]&}|j|��5|j|dd�|dd��|j|d	d
�|d	d
��|j|d	d�|dd��|j|d	d�|d	d	��t	d�d�d
�d�g�D]q\}}|j|��5|jtd|j�d|j�d��5||dd�|dd��ddd�ddd��s	ddd���)td��Gd�d��}t	d�d�d�g�D]F\}}|j|��5|j||dd�|dd���ddd��Ht	d�d�d�g�D]�\}}|j|��5|j||dd�|dd	���|j||dd	�|d	d���|j||d	d�|d	d	���ddd���t	d�d�d�g�D]�\}}|j|��5|j||dd	�|dd���|j||d	d�|dd	���|j||d	d	�|d	d���ddd���y#1swY���xYw#1swY��WxYw#1swY��xYw#1swY���xYw#1swY��zxYw#1swY��xYw)Nc�"�eZdZUeed<eed<y)�(TestCase.test_simple_compare.<locals>.C0r8r�Nr9rrrrrI�����F��FrrFrc�"�eZdZUeed<eed<y)�(TestCase.test_simple_compare.<locals>.C1r8r�Nr9rrrr�rL�rJrr�r"rrC�c��||kSr�rr$s  rr�z.TestCase.test_simple_compare.<locals>.<lambda>�r&rc��||kSr�rr$s  rr�z.TestCase.test_simple_compare.<locals>.<lambda>�r(rc��||kDSr�rr$s  rr�z.TestCase.test_simple_compare.<locals>.<lambda>�r&rc��||k\Sr�rr$s  rr�z.TestCase.test_simple_compare.<locals>.<lambda>�r(rr+r-r.r/Tc�"�eZdZUeed<eed<y)�'TestCase.test_simple_compare.<locals>.Cr8r�Nr9rrrr%rS�rJrr%c��||k(Sr�rr$s  rr�z.TestCase.test_simple_compare.<locals>.<lambda>��
��q�A�v�rc��||kSr�rr$s  rr�z.TestCase.test_simple_compare.<locals>.<lambda>�rUrc��||k\Sr�rr$s  rr�z.TestCase.test_simple_compare.<locals>.<lambda>�rUrc��||kSr�rr$s  rr�z.TestCase.test_simple_compare.<locals>.<lambda>��
��q�1�u�rc��||kSr�rr$s  rr�z.TestCase.test_simple_compare.<locals>.<lambda>�rUrc��||k7Sr�rr$s  rr�z.TestCase.test_simple_compare.<locals>.<lambda>�rUrc��||kDSr�rr$s  rr�z.TestCase.test_simple_compare.<locals>.<lambda>�rYrc��||k\Sr�rr$s  rr�z.TestCase.test_simple_compare.<locals>.<lambda>�rUrc��||k7Sr�rr$s  rr�z.TestCase.test_simple_compare.<locals>.<lambda>�rUr)	r(r2r)r�r3rHr�rrvr6s       r�test_simple_comparezTestCase.test_simple_compare�s���	�	�	�
�	�
��	�	�	�
 �	���8�
	5�C����#��&�
5�� � ��Q���C��1�I�6�� � ��Q���C��1�I�6��#�#�C��1�I�s�1�a�y�9��#�#�C��1�I�s�1�a�y�9�(�*<�*=�*<�*=�*?� @�5�G�C�����#��.�5�!�3�3�I�6Z�[^�[g�[g�Zh�ho�ps�p|�p|�o}�}~�4�A�5��s�1�a�y�#�a��)�4�5�5�5�	5�
5�
5�
	5�
��	�	�	�
�	�!�"5�"5�"5�"7�8�	6�G�C�����#��&�
6�����1�Q��7�A�a��G� 4�5�
6�
6�	6�!�"4�"5�"5�"7�8�	6�G�C�����#��&�
6�����1�Q��7�A�a��G� 4�5�����1�Q��7�A�a��G� 4�5�����1�Q��7�A�a��G� 4�5�
6�
6�	6�!�"4�"5�"5�"7�8�	6�G�C�����#��&�
6�����1�Q��7�A�a��G� 4�5�����1�Q��7�A�a��G� 4�5�����1�Q��7�A�a��G� 4�5�
6�
6�	6�/5�5��5�5��
5�
5��,
6�
6��
6�
6��
6�
6�sc�B,L5�32L(	�%L�=L(	�
L5�'M�7A3M�A3M�L%� L(	�(L2
�-L5�5L?	�M	�M	�M%	c
�*�tGd�d��}tGd�d|��}td�dfd�dfg�D]H\}\}}|j|�	�5|j||d
�|d
��|�ddd��Jtd�d�d
�d�g�D]T\}}|j|�	�5|j	t
d�5||d
�|d
��ddd�ddd��Vy#1swY��xYw#1swY� xYw#1swY�yxYw)Nc��eZdZUeed<y)�+TestCase.test_compare_subclasses.<locals>.Br3Nr9rrrr�rb�r<rr�c��eZdZy)�+TestCase.test_compare_subclasses.<locals>.CNrrrrr%rd�r&rr%c��||k(Sr�rr$s  rr�z2TestCase.test_compare_subclasses.<locals>.<lambda>��
��A��F�rFc��||k7Sr�rr$s  rr�z2TestCase.test_compare_subclasses.<locals>.<lambda>�rfrTr+rc��||kSr�rr$s  rr�z2TestCase.test_compare_subclasses.<locals>.<lambda>�rYrc��||kSr�rr$s  rr�z2TestCase.test_compare_subclasses.<locals>.<lambda>�rUrc��||kDSr�rr$s  rr�z2TestCase.test_compare_subclasses.<locals>.<lambda>�rYrc��||k\Sr�rr$s  rr�z2TestCase.test_compare_subclasses.<locals>.<lambda>�rUrz.not supported between instances of 'B' and 'C')r(r3r2r)rHr�)r-r�r%r,r7�expecteds      r�test_compare_subclassesz TestCase.test_compare_subclasses�sA��
�	�	�
�	�
�	��	�
�	�$-�/B�E�.J�/B�D�.I�.K�$L�	;��C��"�h����#��&�
;�� � ��A�a�D�!�A�$���:�
;�
;�	;�
!�"4�"5�"4�"5�"7�8�	#�G�C�����#��&�
#��+�+�I�,\�^�#��q��t�Q�q�T�N�#�
#�
#�		#�
;�
;��#�#��
#�
#�s0�&C1�1D	�C=�D	�1C:	�=D�D	�	D	c��dD�]>\}}}|j||��5|dk(r;|jtd�5t||��Gd�d��}ddd��n�t||��Gd�d��}|dk(r�|j	d	|j
�|j	d
|j
�|j	d|j
�|j	d|j
�|j	d
|j
��n.|dk(r�|j
d	|j
�|j
d
|j
�|j
d|j
�|j
d|j
�|j
d
|j
�n�|dk(r�|j
d	|j
�|j	d
|j
�|j	d|j
�|j	d|j
�|j	d
|j
�n
Jd|����ddd���Ay#1swY�xYw#1swY��YxYw)N))FF�neither)FT�	exception)TF�eq_only)TT�both)�eqrrpz eq must be true if order is truec��eZdZy��!TestCase.test_eq_order.<locals>.CNrrrrr%rv���� rr%c��eZdZyrurrrrr%z!TestCase.test_eq_order.<locals>.C����rror��__lt__�__le__�__gt__�__ge__rrrq�unknown result )r2rHrIr(�assertNotInrrY)r-rsr�resultr%s     r�
test_eq_orderzTestCase.test_eq_order�s��*
�$	C�%�R�E�6�����5��1�
C��[�(��/�/�
�<^�_�!�"�b��6�!�!�7�!�!�!�
�"�E�2���3����*��(�(��1�:�:�>��(�(��1�:�:�>��(�(��1�:�:�>��(�(��1�:�:�>��(�(��1�:�:�>��6�)��
�
�h��
�
�;��
�
�h��
�
�;��
�
�h��
�
�;��
�
�h��
�
�;��
�
�h��
�
�;��9�,��
�
�h��
�
�;��(�(��1�:�:�>��(�(��1�:�:�>��(�(��1�:�:�>��(�(��1�:�:�>�B���z�&B�B�=
C�
C�
$	C�!�!��
C�
C�s#�I�I�G%I�I�I�I	c���tGd�d��}|j|d�jd�|jtd�5|�ddd�y#1swYyxYw)Nc�&�eZdZUe�Zeed<y)�)TestCase.test_field_no_default.<locals>.Cr8N�rrrrGr8r:r;rrrr%r�	s���W�A�s�rr%r��8__init__\(\) missing 1 required positional argument: 'x')r(r)r8rHr�r�s  r�test_field_no_defaultzTestCase.test_field_no_defaultse��	�	�	�
�	�	
����1�����#�
�
#�
#�I�%?�@�	�
�C�	�	�	�s�A�A&c�B��t��tG�fd�d��}|j|j��|d�}|j	|jd�|`|j|j��|j|�j��y)Nc�.��eZdZUeW���Zeed<y)�&TestCase.test_field_default.<locals>.C�rEr8N)rrrrGr8r�r;r�s�rr%r�s����g�.�A�v�.rr%r�)r�r(�assertIsr8r))r-r%r�rEs   @r�test_field_defaultzTestCase.test_field_defaults����(��	�	/�	/�
�	/�	
�
�
�a�c�c�7�#�
�b�E��������b�!�
�C��
�
�a�c�c�7�#��
�
�a�c�e�e�W�%rc�@�tGd�d��}|jt�5|�ddd�|d�}|jt	|�d�tGd�d��}|dd�}|jt	|�d�y#1swY�dxYw)Nc�*�eZdZUed��Zeed<y)�$TestCase.test_not_in_repr.<locals>.CF�rNr8Nr�rrrr%r�&�����&�A�s�&rr%r�z&TestCase.test_not_in_repr.<locals>.C()c�4�eZdZUed��Zeed<eed<y)r�Fr�r8r�Nr�rrrr%z$TestCase.test_not_in_repr.<locals>.C.s����&�A�s�&��Fr�z*TestCase.test_not_in_repr.<locals>.C(y=20))r(�assertRaisesr�r)rNr�s   r�test_not_in_reprzTestCase.test_not_in_repr%s���	�	'�	'�
�	'�
�
�
�y�
)�	�
�C�	�
�b�E������a��"J�K�	�	�	�
�	�
�b�"�I������a��"N�O�	�	�s�B�Bc�$�tGd�d��}|j|�|dd��|j|dd�|dd��|j|d�|dd��|j|dd�|dd��y)	Nc�:�eZdZUdZeed<edd��Zeed<y)�'TestCase.test_not_in_compare.<locals>.Crr8F�)�comparerEr�N)rrrr8r:r;rGr�rrrr%r�6s���A�s�J��5�!�4�A�s�4rr%rr�rCr�r�r��r(r)r�r�s  r�test_not_in_comparezTestCase.test_not_in_compare5s���	�	5�	5�
�	5�	
�����a��2�h�'�����1�b��1�Q��8�,����A�a�D�!�A�r�(�+����A�a��H�a��2�h�/rc����Gd�d��d}|jt|�5tGd�d��}ddd�|jt|�5tG�fd�d��}ddd�|jt|�5���d��_tG�fd�d��}ddd�y#1swY��xYw#1swY�YxYw#1swYyxYw)	Nc��eZdZdZy)�7TestCase.test_no_unhashable_default.<locals>.UnhashableNr�rrr�
Unhashabler�B����Hrr�z-mutable default .* for field a is not allowedc��eZdZUiZeed<y��.TestCase.test_no_unhashable_default.<locals>.Ar%N)rrrr%�dictr;rrr�Ar�Gs����4�rr�c�*��eZdZUW��Zeed<yr��rrrr%rr;)r�s�rr�z.TestCase.test_no_unhashable_default.<locals>.ALs���#���3�%rc��y�Nrrrrrr�z5TestCase.test_no_unhashable_default.<locals>.<lambda>Ur�rc� ��eZdZUW�Zeed<yr�r�)�
unhashables�rr�z.TestCase.test_no_unhashable_default.<locals>.AVs
���#��3�#r)rHrIr(r�)r-�
unhashable_rer�r�r�s   @@r�test_no_unhashable_defaultz#TestCase.test_no_unhashable_default@s����	�	�H�
�
�
#�
#�J�
�
>�	�
�
�
��
�	�
�
#�
#�J�
�
>�	&�
�
&�
&��
&�	&��
#�
#�J�
�
>�	$�#��J�"+�J��
�
$�
$��
$�	$�	$�	�	��
	&�	&��	$�	$�s#�B9�C�%C�9C�C�Cc	�z���dD]�\��}|j����5td��G��fd�d��}|dk(r+|jt|d��td	��n:|d
k(r+|jt|d��td��n
Jd|����ddd���y#1swY��xYw)
N))TFrG)TTrG)FF�absent)FTr�)NFr�)NTrG)r�r�Tr�c�4��eZdZUeW�W�d��Zeed<y)�)TestCase.test_hash_field_rules.<locals>.Cr�)r�r�rEr8Nr�)r��hash_s��rr%r�gs���"�7���J�A�s�Jrr%rGr�)r�r�rr~)r2r(r)r�)r-r�r%r�r�s   @@r�test_hash_field_ruleszTestCase.test_hash_field_rulesZs����.�	?�)�U�w�����5�'��:�
?��t�,�K�K�-�K��W�$��$�$�T�!�A�$�Z��d��<��x�'��$�$�T�!�A�$�Z��b��:�>�O�F�:�">�>�
?�
?�	?�
?�
?�s�BB1�1B:	c� �tGd�d��}|jd|�j�tGd�d��}|jd|d�j�|jt	|d��dddd	��y)
Nc�*�eZdZUed��Zeed<y)�.TestCase.test_init_false_no_default.<locals>.CF�rMr8Nr�rrrr%r�wr�rr%r8c�P�eZdZUeed<dZeed<ed��Zeed<dZeed<y	)
r�r8rr�Fr�r�r��tN)	rrrr:r;r�rGr�r�rrrr%z.TestCase.test_init_false_no_default.<locals>.C}s(���F��A�s�J���&�A�s�&��A�s�Krr�rr�r�)r�r8r�)r(rrr)�varsr�s  r�test_init_false_no_defaultz#TestCase.test_init_false_no_defaultts���
�	'�	'�
�	'�	
����a�c�l�l�+�	�	�	�
�	�	
����a��d�m�m�,�����a��d��2�A�A�%>�?rc���tGd�d��}t|�}|j|t�|D]G}|j	t|�t�|j|j|j��I|jt|�d�|j|djd�|j|dj
t�|jt|d��|j|dj �|j|dj"�|j|djd�|j|dj
t$�|j't)|d��|j|dj �|j|dj"�|j|djd	�|j|dj
t$�|jt|d	��|j|dj �|j|dj"�y)
Nc�R�eZdZUeed<edd��Zeed<ed��Zeed<y)�%TestCase.test_class_marker.<locals>.Cr8FN�rMrEr�r�r�)	rrrr:r;rGr�r�r�rrrr%r��s'���F���t�4�A�s�4���&�A�s�&rr%r�rr8rCr�rMr�)r(r+�assertIsInstance�tupler�rX�FieldrYrPr;r)r*r:�assertFalserwrvrMrNr��assertIsNoner)r-r%�
the_fields�fs    r�test_class_markerzTestCase.test_class_marker�s���	�	'�	'�
�	'�
�A�Y�
�	
���j�%�0��	5�A��M�M�$�q�'�5�)��M�M�!�&�&�!�"3�"3�4�	5�	
����Z��!�,�����A��+�+�S�1�����A��+�+�S�1������C��)�����A��+�+�,�����A��+�+�,�����A��+�+�S�1�����A��+�+�S�1����'�!�S�/�*�����A��+�+�,�����A��+�+�,�����A��+�+�S�1�����A��+�+�S�1������C��)�����A��+�+�,�����A��+�+�,rc�F�tGd�d��}tGd�d|��}|jt|�D�cgc]}|j|jf��c}gd��tGd�d|��}|jt|�D�cgc]}|j|jf��c}gd��tGd	�d
|��}|jt|�D�cgc]}|j|jf��c}gd��ycc}wcc}wcc}w)Nc�8�eZdZUdZeed<dZeed<dZeed<y)�$TestCase.test_field_order.<locals>.B�B:ar%�B:br�B:cr�N)rrrr%r�r;rr�rrrr�r��s���A�s�N��A�s�N��A�s�Nrr�c��eZdZUdZeed<y)�$TestCase.test_field_order.<locals>.C�C:brN)rrrrr�r;rrrr%r������A�s�Nrr%)�r%r�)rr�)r�r�c��eZdZUdZeed<y)�$TestCase.test_field_order.<locals>.D�D:cr�N)rrrr�r�r;rrrrbr��r�rrb)r��rr��r�r�c�*�eZdZUdZeed<dZeed<y)�$TestCase.test_field_order.<locals>.E�E:ar%�E:d�dN)rrrr%r�r;r�rrr�Er��s���A�s�N��A�s�Nrr�))r%r�r�r�)r�r�)r(r)r+rPrE)r-r�r%r�rbr�s      r�test_field_orderzTestCase.test_field_order�s��	�	�	�
�	�

�	��	�
�	�	
���v�a�y�A�!�1�6�6�1�9�9�-�A�(�	)�

�	��	�
�	�	
���v�a�y�A�!�1�6�6�1�9�9�-�A�(�	)�

�	��	�
�	�	
���v�a�y�A�!�1�6�6�1�9�9�-�A�(�	)��'B��B��Bs�D�D�*Dc� ��t��tG�fd�d��}|jt|d��|jt|d��|j	|j
��|j
|jd�y)Nc�b��eZdZUeed<ed��Zeed<W�Zeed<ed��Z	eed<y	)
�$TestCase.test_class_attrs.<locals>.Cr8Fr�r�r�r�r�r�N)
rrrr:r;rGr�r�r�r�r�s�rr%r��s0����F���&�A�s�&��A�v���3�'�A�s�'rr%r8r�r�)r�r(r�rwr�r�r)r�)r-r%rEs  @r�test_class_attrszTestCase.test_class_attrs�ss����(��	�	(�	(�
�	(�	
�����C��)������C��)��
�
����g�&�������c�"rc�������tgdgftiddiftt�tdg�ffD]�\���|j���5|j	t
d��d��5tG��fd�d��}ddd�|j	t
d��d��5tG��fd	�d��}ddd�Gd
�d���|j	t
d�5tG��fd
�d��}ddd�tG�fd�d��}tG��fd�d��}ddd���y#1swY��xYw#1swY��xYw#1swY�XxYw#1swY��1xYw)NrCr��typzmutable default z for field x is not allowedc�"��eZdZUW�ZW�ed<y)�8TestCase.test_disallowed_mutable_defaults.<locals>.Pointr8N)rrrr8r;)�emptyr�s��r�Pointr��s���!&��3�rr�z for field y is not allowedc�"��eZdZUW�ZW�ed<y)r�r�N)rrrr�r;)�	non_emptyr�s��rr�z8TestCase.test_disallowed_mutable_defaults.<locals>.Point�s
���!*��3�*rc��eZdZy)�;TestCase.test_disallowed_mutable_defaults.<locals>.SubclassNrrrr�Subclassr��rrr�z7mutable default .*Subclass'> for field z is not allowedc�,��eZdZUW��ZW�ed<y)r�r�N)rrrr�r;�r�r�s��rr�z8TestCase.test_disallowed_mutable_defaults.<locals>.Point�s���!)���3�+rc�2��eZdZUW��ZeW�ed<y)�4TestCase.test_disallowed_mutable_defaults.<locals>.Cr�N)rrrr�rr;r�s�rr%r�s���'*�u�A�x��}�,rr%c�2��eZdZUW��ZeW�ed<y)r�r8N)rrrr8rr;r�s��rr%z4TestCase.test_disallowed_mutable_defaults.<locals>.Cs���'/�z�A�x��}�1r)�listr��setr2rHrIr()r-r�r%r�r�r�r�s   @@@@r� test_disallowed_mutable_defaultsz)TestCase.test_disallowed_mutable_defaults�s����'+�R�!��o�'+�R�!�A��&7�'*�C�E�3��s�8�&<�&(�)	2�!�C��	����#��&�%
2��+�+�J�.>�s�e�D?�-?�@�'��'�'��'�	'��+�+�J�.>�s�e�D?�-?�@�+��+�+��+�	+�*�s�)��+�+�J�-J�.�,��,�,��,�,��-�-��-��2�2��2�I%
2�%
2�	)	2�'�'��+�+��,�,��+%
2�%
2�sT�
E�(D7�?"E�!E�8)E�!E�83E�7E�<E�E�E�E�E�E%	c���Gd�d��tG�fd�d��}��}||�}||�}|j||�|jjj	ddg�|j||�|j|jjddg�|j|j|j�y)Nc��eZdZd�Zy)�<TestCase.test_deliberately_mutable_defaults.<locals>.Mutablec��g|_yr���lr�s rr�zETestCase.test_deliberately_mutable_defaults.<locals>.Mutable.__init__
s	����rN�rrrr�rrr�Mutabler�s��
rrc���eZdZUW�ed<y)�6TestCase.test_deliberately_mutable_defaults.<locals>.Cr8N�rrrr;)rs�rr%rs����Jrr%rCrM)r(r)r8r��extendr�)r-r%�lst�o1�o2rs     @r�"test_deliberately_mutable_defaultsz+TestCase.test_deliberately_mutable_defaults	s����	�	�
�	�	�
�	��i��
�s�V��
�s�V������R� �
�����
�
�q�!�f������R� ���������!�Q��(��
�
�b�d�d�B�D�D�!rc�v�t�Gd�d��}|j|d�jd�y)Nc��eZdZUeed<y)�#TestCase.test_no_options.<locals>.Cr8Nr9rrrr%r r<rr%r=r>r�s  r�test_no_optionszTestCase.test_no_optionss5��	��	�	�
�	�	
����2����"�%rc���tGd�d��}|j|dd�d�tGd�d��}|j|dd�|dd��y)	Nc�"�eZdZUeed<eed<y)�&TestCase.test_not_tuple.<locals>.Pointr8r�Nr9rrrr�r(rJrr�rCrM�rCrMc�"�eZdZUeed<eed<y)�"TestCase.test_not_tuple.<locals>.Cr8r�Nr9rrrr%r/rJrr%r�)r(r�)r-r�r%s   r�test_not_tuplezTestCase.test_not_tuple&sh��	�	�	�
�	�	
���E�!�Q�K��0�
�	�	�
�	�	
���E�!�Q�K��1�a��1rc��tGd�d��}tGd�d��}|j|ddd�|ddd��|j|dd	d�d
�|jtd�5|dd
d�\}}}ddd�tGd�d��}|j|ddd�|��y#1swY�<xYw)Nc�,�eZdZUeed<eed<eed<y)�2TestCase.test_not_other_dataclass.<locals>.Point3Dr8r�r�Nr9rrr�Point3Dr8����F��F��Frrc�,�eZdZUeed<eed<eed<y)�/TestCase.test_not_other_dataclass.<locals>.Date�year�month�dayNr9rrr�Dater>s���I��J��Hrri��r�rCrM)rCrMr��unpackr�r�c�8�eZdZUdZeed<dZeed<dZeed<y)�4TestCase.test_not_other_dataclass.<locals>.Point3Dv1rr8r�r�N)rrrr8r:r;r�r�rrr�	Point3Dv1r"Ms���A�s�J��A�s�J��A�s�Jrr#r)r(r�rHr�)r-rrr8r�r�r#s       r�test_not_other_dataclassz!TestCase.test_not_other_dataclass5s���
�	�	�
�	�

�	�	�
�	�
	
���G�D�!�Q�/��d�A�q�1A�B����G�A�q�!�,�i�8��
#�
#�I�x�
8�	'��a��A�&�G�A�q�!�	'�

�	�	�
�	�	
���G�A�q�!�,�i�k�:�	'�	'�s�9C�Cc�����Gd�d�������fd�}tG��fd�d��}||�tdd��G��fd�d��}||�y)	Nc��eZdZy)�-TestCase.test_function_annotations.<locals>.FNrrrr�Fr'Vr_rr(c�<���j|jdt��j|jdt��j|jd���j|jdt��j|jdt
�t
j|j�}�j|jd�t|jj��}t|�}�j|jd�t|�}�j|jd��j|j t��j|j"tj$j&��j|j(tj$j*�t|�}�j|jd��j|j t��j|j"tj$j&��j|j(tj$j*�t|�}�j|jd��j|j ���j|j(tj$j*�t|�}�j|jd��j|j t��j|j(tj$j*��j-t.t|�y)Nr3�j�kr�r�r-)r)r;r:r��float�complexrsrtr�r��return_annotationr�ru�valuesr�rP�
annotationrE�	Parameterr��kind�POSITIONAL_OR_KEYWORDr��
StopIteration)rrrt�paramsrxr(r-s    ��r�validate_classz:TestCase.test_function_annotations.<locals>.validate_classZs����
���S�0�0��5�s�;����S�0�0��5�s�;����S�0�0��5�q�9����S�0�0��5�u�=����S�0�0��5�w�?� �)�)�#�,�,�7�I��M�M�)�5�5�t�<��)�.�.�5�5�7�8�F���L�E����U�Z�Z��0���L�E����U�Z�Z��-��M�M�U�-�-�s�3����U�]�]�G�,=�,=�,C�,C�D����U�Z�Z��):�):�)P�)P�Q���L�E����U�Z�Z��-��M�M�U�-�-�s�3����U�]�]�G�,=�,=�,C�,C�D����U�Z�Z��):�):�)P�)P�Q���L�E����U�Z�Z��-��M�M�U�-�-�q�1����U�Z�Z��):�):�)P�)P�Q���L�E����U�Z�Z��-��M�M�U�-�-�u�5����U�Z�Z��):�):�)P�)P�Q����m�T�6�:rc�p��eZdZUeed<eed<W�ZW�ed<ed��Ze	ed<edd�	�Z
eed
<y��-TestCase.test_function_annotations.<locals>.Cr3r*r+Nr�r�y@@F�rErMr��rrrr:r;r�r+rGr�r,r�r-�r(r�s��rr%r9��6����F��F��A�q�H��4�(�A�u�(��T��6�A�w�6rr%T)rhr�c�p��eZdZUeed<eed<W�ZW�ed<ed��Ze	ed<edd�	�Z
eed
<yr8r;r<s��rr%z-TestCase.test_function_annotations.<locals>.C�r=r)r()r-r6r%r(r�s`  @@r�test_function_annotationsz"TestCase.test_function_annotationsTsg���	�	�
�C��(	;�V
�	7�	7�
�	7�	�q��
�$�D�	1�	7�	7�
2�	7�	�q�rc��tGd�d��}|jtd�5|�ddd�|jd|j�tGd�d��}|jtd�5|�ddd�|jd|j�y#1swY�{xYw#1swY�2xYw)Nc�*�eZdZUee��Zeed<y)�(TestCase.test_missing_default.<locals>.Cr�r8N�rrrrGrQr8r:r;rrrr%rB�s����)�A�s�)rr%�3__init__\(\) missing 1 required positional argumentr8c��eZdZUeed<y)�(TestCase.test_missing_default.<locals>.Dr8Nr9rrrrbrF�r<rrb�r(rHr�rrrds   r�test_missing_defaultzTestCase.test_missing_default�s���
�	*�	*�
�	*�
�
#�
#�I�%:�;�	�
�C�	�	
����a�j�j�)�	�	�	�
�	�
�
#�
#�I�%:�;�	�
�C�	�	
����a�j�j�)�	�	��	�	���B,�?B8�,B5�8Cc��tGd�d��}|jtd�5|�ddd�|jd|j�tGd�d��}|jtd�5|�ddd�|jd|j�y#1swY�{xYw#1swY�2xYw)Nc�*�eZdZUee��Zeed<y)�0TestCase.test_missing_default_factory.<locals>.Cr�r8NrCrrrr%rL�s����1�A�s�1rr%rDr8c�,�eZdZUeee��Zeed<y)�0TestCase.test_missing_default_factory.<locals>.DrDr8NrCrrrrbrN�s����'�B�A�s�BrrbrGrds   r�test_missing_default_factoryz%TestCase.test_missing_default_factory�s���
�	2�	2�
�	2�
�
#�
#�I�%:�;�	�
�C�	�	
����a�j�j�)�	�	C�	C�
�	C�
�
#�
#�I�%:�;�	�
�C�	�	
����a�j�j�)�	�	��	�	�rIc�B�|jdtt��y)NzMISSING_TYPE object)rYrNrQr�s r�test_missing_reprzTestCase.test_missing_repr�s���
�
�+�T�'�]�;rc�J�tGd�d��}|jt|j�dg�|j|d�j	�d�|j|d�j
d�|j|d�jd�y)Nc�:�eZdZUeed<defd�Zedefd��Zy)�7TestCase.test_dont_include_other_annotations.<locals>.Cr3�returnc��y�Nr�rr�s rr�z;TestCase.test_dont_include_other_annotations.<locals>.C.foo����rc��y�Nr�rr�s r�barz;TestCase.test_dont_include_other_annotations.<locals>.C.bar�s��rN)rrrr:r;r��propertyr[rrrr%rT�s,���F�
�S�
�
�
�S�
��
rr%r3r�r�r�)r(r)r�r;r�r[r3r�s  r�#test_dont_include_other_annotationsz,TestCase.test_dont_include_other_annotations�s���	�	�	�
�	�	
����a�/�/�0�3�%�8�����2�����a�(�����2����A�&�����2����"�%rc��tGd�d��}|jt�5|�ddd�tGd�d��}|jt�5|�ddd�|d�td��Gd�d��}|�tGd�d��}|j|�jd	�|j|d
�jd�td�
�Gd�d��}|jt
�5|�ddd�y#1swY��xYw#1swY��xYw#1swYyxYw)Nc��eZdZd�Zy)�"TestCase.test_post_init.<locals>.Cc��t��r��rr�s r�
__post_init__z0TestCase.test_post_init.<locals>.C.__post_init__��
��!�m�#rN�rrrrcrrrr%r`����
$rr%c�"�eZdZUdZeed<d�Zy)r`r�r3c�6�|jdk(r
t��y�Nr�)r3rr�s rrcz0TestCase.test_post_init.<locals>.C.__post_init__�s���6�6�R�<�%�-�'� rN)rrrr3r:r;rcrrrr%z"TestCase.test_post_init.<locals>.C�s���A�s�K�
(rr�Fr�c��eZdZd�Zy)r`c��t��r�rbr�s rrcz0TestCase.test_post_init.<locals>.C.__post_init__�rdrNrerrrr%z"TestCase.test_post_init.<locals>.C�rfrc�"�eZdZUdZeed<d�Zy)r`rr8c�.�|xjdzc_y�NrMr~r�s rrcz0TestCase.test_post_init.<locals>.C.__post_init__�������!��rN�rrrr8r:r;rcrrrr%z"TestCase.test_post_init.<locals>.C�����A�s�J�
rrrMr�Tr�c�"�eZdZUdZeed<d�Zy)r`rr8c�.�|xjdzc_yrnr~r�s rrcz0TestCase.test_post_init.<locals>.C.__post_init__rorNrprrrr%z"TestCase.test_post_init.<locals>.C�rqr)r(r�rr)r8�FrozenInstanceErrorr�s  r�test_post_initzTestCase.test_post_init�sJ��	�	$�	$�
�	$��
�
�{�
+�	�
�C�	�
�	(�	(�
�	(�
�
�
�{�
+�	�
�C�	�	
�!��
��	�	$�	$�
�	$�	
��	�	�	�
�	�	
��������"�����1�����#�
�$�	�	�	�
 �	��
�
�2�
3�	�
�C�	�	�M	�	��	�	��:	�	�s#�D.�!D:�E�.D7�:E�Ec��Gd�d�}tGd�d|��}|j|�jd�tGd�d|��}|jt�5|�ddd�tGd�d|��}|jt�5|�ddd�y#1swY�CxYw#1swYyxYw)Nc��eZdZd�Zy)�(TestCase.test_post_init_super.<locals>.Bc��t��r�rbr�s rrcz6TestCase.test_post_init_super.<locals>.B.__post_init__rdrNrerrrr�rxs��
$rr�c��eZdZd�Zy)�(TestCase.test_post_init_super.<locals>.Cc��d|_yrZr~r�s rrcz6TestCase.test_post_init_super.<locals>.C.__post_init__
�	����rNrerrrr%r{s��
rr%r�c���eZdZ�fd�Z�xZS)r{c�"��t�|��yr�)�superrc�r-�	__class__s �rrcz6TestCase.test_post_init_super.<locals>.C.__post_init__s�����%�'r)rrrrc�
__classcell__�r�s@rr%z(TestCase.test_post_init_super.<locals>.Cs
���
(�
(rc��eZdZy)r{Nrrrrr%z(TestCase.test_post_init_super.<locals>.Cr&r)r(r)r8r�r�r-r�r%s   r�test_post_init_superzTestCase.test_post_init_supers���	$�	$�
�	��	�
�	�	
��������"�
�	(��	(�
�	(��
�
�{�
+�	�
�C�	�

�	��	�
�	��
�
�{�
+�	�
�C�	�	�	�	��	�	�s�)B3�"B?�3B<�?Cc����d�tG�fd�d��}|j��|dd�}|j|j|jfd�|j��y)NFc�8��eZdZUeed<eed<e�fd��Zy)�/TestCase.test_post_init_staticmethod.<locals>.Cr8r�c�
��d�y�NTr��flags�rrcz=TestCase.test_post_init_staticmethod.<locals>.C.__post_init__*s
����rN)rrrr:r;�staticmethodrcr�s�rr%r�&s����F��F�
�
��
rr%r�r��r�r�)r(r�r)r8r�rv)r-r%r�r�s   @r�test_post_init_staticmethodz$TestCase.test_post_init_staticmethod$sb�����	�	�	�
�	�	
�����
�a��G�����!�#�#�q�s�s��V�,�����rc��tGd�d��}|j|j�|dd�}|j|j|j
fd�|j
|j�y)Nc�6�eZdZUdZeed<eed<ed��Zy)�.TestCase.test_post_init_classmethod.<locals>.CFr8r�c��d|_yr�r�r"s rrcz<TestCase.test_post_init_classmethod.<locals>.C.__post_init__:s	����rN)rrrr�r:r;�classmethodrcrrrr%r�5s#���D��F��F�
�
 ��
 rr%r�r�r�)r(r�r�r)r8r�rvr�s   r�test_post_init_classmethodz#TestCase.test_post_init_classmethod4sd��	�	 �	 �
�	 �	
������ �
�a��G�����!�#�#�q�s�s��V�,�������rc���tGd�d��}tGd�d��}tGd�d||��}|�}|j|j�|j|j�tGd�d��}tGd	�d
��}tGd�d||��}|�}|j	|j�|j|j�y)
Nc��eZdZy)�2TestCase.test_post_init_not_auto_added.<locals>.A0Nrrrr�A0r�Hr&rr�c�"�eZdZUdZeed<d�Zy)�2TestCase.test_post_init_not_auto_added.<locals>.B0F�b_calledc��d|_yr��r�r�s rrcz@TestCase.test_post_init_not_auto_added.<locals>.B0.__post_init__O�	�� $��
rN�rrrr��boolr;rcrrr�B0r�L���"�H�d�"�
%rr�c�.��eZdZUdZeed<�fd�Z�xZS)�2TestCase.test_post_init_not_auto_added.<locals>.C0F�c_calledc�0��t�|��d|_yr��r�rcr�r�s �rrcz@TestCase.test_post_init_not_auto_added.<locals>.C0.__post_init__U������%�'� $��
r�rrrr�r�r;rcr�r�s@rrr�R����"�H�d�"�
%�
%rrc��eZdZd�Zy)�2TestCase.test_post_init_not_auto_added.<locals>.A1c��yr�rr�s rrcz@TestCase.test_post_init_not_auto_added.<locals>.A1.__post_init__er�rNrerrr�A1r�cs��
rr�c�"�eZdZUdZeed<d�Zy)�2TestCase.test_post_init_not_auto_added.<locals>.B1Fr�c��d|_yr�r�r�s rrcz@TestCase.test_post_init_not_auto_added.<locals>.B1.__post_init__kr�rNr�rrr�B1r�hr�rr�c�.��eZdZUdZeed<�fd�Z�xZS)�2TestCase.test_post_init_not_auto_added.<locals>.C1Fr�c�0��t�|��d|_yr�r�r�s �rrcz@TestCase.test_post_init_not_auto_added.<locals>.C1.__post_init__qr�rr�r�s@rr�r�nr�rr�)r(rvr�r�r�)r-r�r�rr�r�r�r�s        r�test_post_init_not_auto_addedz&TestCase.test_post_init_not_auto_addedCs���

�	�	�
�	�
�	%�	%�
�	%�

�	%��R�	%�
�	%�
�D������
�
�#�����
�
�#�
�	�	�
�	�
�	%�	%�
�	%�

�	%��R�	%�
�	%�
�D��������$�����
�
�#rc��tGd�d��}|d�}|jt|�d�|jtt	|��d�|jt|j
�d�|j|jd�|j|jd�|j|jd	�|j|jd
�|xjdz
c_|j|jd�|d
�}|j|j|jfd�|j|jd�|j|jd�|j|jd	�|j|jd
�y)Nc�p�eZdZUeed<dZeed<dZeeed<dZeeed<dZ	eeed	<d
Z
eed<y)
�"TestCase.test_class_var.<locals>.Cr8r�r���r����w�r���sN)rrrr:r;r�r�rr�r�r�rrrr%r��sD���F��A�s�K�#�A�x��}�#�#�A�x��}�#�#�A�x��}�#�#�A�x�#rr%r�z-TestCase.test_class_var.<locals>.C(x=5, y=10)rMrr�r�r�r�rC��r��r�r�)r(r)rNr*r+r;r�r�r�r�r8r�r�s   r�test_class_varzTestCase.test_class_var~sR��	�	$�	$�
�	$�
�a�D������a��"Q�R�����V�A�Y���+�����Q�.�.�/��3�������d�#�������d�#�������d�#�������d�#�	���q���������d�#�
�b�E�����!�#�#�q�s�s��X�.�������d�#�������d�#�������d�#�������d�#rc�b�tGd�d��}|jd|j�y)Nc��eZdZUeeed<y)�-TestCase.test_class_var_no_default.<locals>.Cr8N)rrrrr:r;rrrr%r��s����}�rr%r8�r(rrr�s  r�test_class_var_no_defaultz"TestCase.test_class_var_no_default�s/��	�	�	�
�	�	
����a�j�j�)rc��|jtd�5tGd�d��}|jd|j�ddd�y#1swYyxYw)N�cannot have a default factoryc�0�eZdZUee��Zeeed<y)�2TestCase.test_class_var_default_factory.<locals>.Cr�r8N�rrrrGr:r8rr;rrrr%r�����#(��#=��8�C�=�=rr%r8�rHr�r(rrr�s  r�test_class_var_default_factoryz'TestCase.test_class_var_default_factory�sZ���
#�
#�I�$C�E�	.�
�
>�
>��
>�
���S�!�*�*�-�
	.�	.�	.���0A�Ac��tGd�d��}|j|jd�tGd�d��}|j|jd�y)Nc�"�eZdZUdZeeed<y)�/TestCase.test_class_var_with_default.<locals>.Cr�r8N)rrrr8rr:r;rrrr%r��s��!�A�x��}�!rr%r�c�0�eZdZUed��Zeeed<y)r�r�r�r8N)rrrrGr8rr:r;rrrr%z/TestCase.test_class_var_with_default.<locals>.C�s��$�R�0�A�x��}�0rr>r�s  r�test_class_var_with_defaultz$TestCase.test_class_var_with_default�sX��	�	"�	"�
�	"�������b�!�	�	1�	1�
�	1�������b�!rc�,�td��Gd�d��}|d�}|jt|d��d�|jtt	|��d�|jt|j
�d�|j|jd�|j|jd	�|j|jd
�|xjdz
c_|j|jd�|d
�}|j|j|jfd�|j|jd�|j|jd	�|j|jd
�y)NTr�c�b�eZdZUeed<dZeed<dZeeed<dZeeed<dZ	eeed	<y
)�)TestCase.test_class_var_frozen.<locals>.Cr8r�r�r�r�r�r�r�r�N)
rrrr:r;r�r�rr�r�rrrr%r��s:���F��A�s�K�#�A�x��}�#�#�A�x��}�#�#�A�x��}�#rr%r�z4TestCase.test_class_var_frozen.<locals>.C(x=5, y=10)rMr�r�r�rCr�r�r�)r(r)rNr*r+r;r�r�r�r8r�r�s   r�test_class_var_frozenzTestCase.test_class_var_frozen�s5��	�$�	�	$�	$�
 �	$�
�a�D������a��d��%[�\�����V�A�Y���+�����Q�.�.�/��3�������d�#�������d�#�������d�#�	
���q���������d�#�
�b�E�����!�#�#�q�s�s��X�.�������d�#�������d�#�������d�#rc�b�tGd�d��}|jd|j�y)Nc��eZdZUeeed<y)�,TestCase.test_init_var_no_default.<locals>.Cr8N)rrr�InitVarr:r;rrrr%r��s���s�|�Orr%r8r�r�s  r�test_init_var_no_defaultz!TestCase.test_init_var_no_default�s/��	�	�	�
�	�	
����a�j�j�)rc��|jtd�5tGd�d��}|jd|j�ddd�y#1swYyxYw)Nr�c�0�eZdZUee��Zeeed<y)�1TestCase.test_init_var_default_factory.<locals>.Cr�r8N)rrrrGr:r8r�r;rrrr%r��s��"'��"<��7�3�<�<rr%r8r�r�s  r�test_init_var_default_factoryz&TestCase.test_init_var_default_factory�sZ���
#�
#�I�$C�E�	.�
�
=�
=��
=�
���S�!�*�*�-�
	.�	.�	.�r�c��tGd�d��}|j|jd�tGd�d��}|j|jd�y)Nc�"�eZdZUdZeeed<y)�.TestCase.test_init_var_with_default.<locals>.Cr�r8N)rrrr8r�r:r;rrrr%r��s�� �A�w�s�|� rr%r�c�0�eZdZUed��Zeeed<y)r�r�r�r8N)rrrrGr8r�r:r;rrrr%z.TestCase.test_init_var_with_default.<locals>.C�s��#�B�/�A�w�s�|�/rr>r�s  r�test_init_var_with_defaultz#TestCase.test_init_var_with_default�sX��	�	!�	!�
�	!�������b�!�	�	0�	0�
�	0�������b�!rc�t�tGd�d��}|d��}|j|jd�y)Nc�6�eZdZUdZeed<dZeeed<d�Zy)�!TestCase.test_init_var.<locals>.CNr8�
init_paramc�2�|j�|dz|_yyrnr~)r-r�s  rrcz/TestCase.test_init_var.<locals>.C.__post_init__�s���6�6�>�'��\�D�F�"r)	rrrr8r:r;r�r�rcrrrr%r��s���A�s�M�'+�J����+�
*rr%r�)r�r�r>r�s   r�
test_init_varzTestCase.test_init_var�s9��	�	*�	*�
�	*�
����������b�!rc��|jttjt�|jt	tt�d�|jt	tt
t�d�|jt	ttt�d�|jt	tttz�d�y)N�dataclasses.InitVar[int]z%dataclasses.InitVar[typing.List[int]]zdataclasses.InitVar[list[int]]zdataclasses.InitVar[int | str])r)r�r:rXrNrr�r�r�s r�test_init_var_preserve_typez$TestCase.test_init_var_preserve_types���������*�*�C�0�	
����g�c�l�+�-G�H�����g�d�3�i�0�1�@�	B�����g�d�3�i�0�1�9�	;�����g�c�#�g�.�/�9�	;rc���tGd�d��}|dd�}|jt|�ddi�tGd�d|��}|ddd	d
�}|jt|�ddd
��y)Nc�(�eZdZUeed<eeed<y)�0TestCase.test_init_var_inheritance.<locals>.Baser8�	init_baseN)rrrr:r;r�rrrr�r�s���F��s�|�#rr�rr�r8c�.�eZdZUeed<eeed<d�Zy)�-TestCase.test_init_var_inheritance.<locals>.Cr��init_derivedc�T�|j|z|_|j|z|_yr��r8r�)r-r�r�s   rrcz;TestCase.test_init_var_inheritance.<locals>.C.__post_init__s"�����)�+������,�.��rN�rrrr:r;r�rcrrrr%r�s���F�!�#�,�&�
/rr%��2�3��er�)r(r)r�)r-r�rr%r�s     r�test_init_var_inheritancez"TestCase.test_init_var_inheritances���
�	$�	$�
�	$�
��B�K������a��3��(�+�	�	/��	/�
�	/�
�b�"�b�"�������a����"5�6rc�*��tGd�d��}|d�}|d�}|j|jd�|j|jg�|j||�|j	|j|j�|jt|ddg��ddgf�g�tG�fd�d��}|d�}|d�}|j|jd�|j|jg�|j||�|j
|j|j�|jt|ddg��ddgf�tGd�d��}|jt|��d�|j|�jg�td	�
�Gd�d��}|jt|��gf�|jt|��td��tGd
�d��}|jt|��gf�tGd�d��}|j|�|dg��y)Nc�4�eZdZUeed<ee��Zeed<y)�(TestCase.test_default_factory.<locals>.Cr8r�r�N)rrrr:r;rGr�r�rrrr%r(s���F��D�1�A�t�1rr%r�r�rCc�<��eZdZUeed<e�fd���Zeed<y)rr8c����Sr�rr�s�rr�z1TestCase.test_default_factory.<locals>.C.<lambda>:s���A�rr�r�N)rrrr:r;rGr�r�r�s�rr%z(TestCase.test_default_factory.<locals>.C7s����F��I�6�A�t�6rc�,�eZdZUeed��Zeed<y)rF)rFrNr8N�rrrrGr�r8r;rrrr%z(TestCase.test_default_factory.<locals>.CF����D�u�=�A�t�=rz*TestCase.test_default_factory.<locals>.C()Tr�c�,�eZdZUeed��Zeed<y)rF)rFr�r8Nr
rrrr%z(TestCase.test_default_factory.<locals>.CMrrrc�,�eZdZUeed��Zeed<y)rF�rFrMr8Nr
rrrr%z(TestCase.test_default_factory.<locals>.CTrrc�,�eZdZUeed��Zeed<y)rF)rFr�r8Nr
rrrr%z(TestCase.test_default_factory.<locals>.CZs���D�%�@�A�t�@r)	r(r)r8r��assertIsNot�astupler�rNr�)r-r%�c0�c1r�s    @r�test_default_factoryzTestCase.test_default_factory&s?���	�	2�	2�
�	2��q�T��
�q�T��������q�!�������r�"�����R� �������r�t�t�$������1�q�c��+�a�!��X�6�
��	�	7�	7�
�	7��q�T��
�q�T��������q�!�������r�"�����R� ��
�
�b�d�d�B�D�D�!������1�q�c��+�a�!��X�6�
�	>�	>�
�	>�����a�c��$P�Q���������#�
�t�	$�	>�	>�
%�	>���������u�-�����a�c��D��H�-�
�	>�	>�
�	>���������u�-�
�	A�	A�
�	A������a���f�%rc���t��tG�fd�d��}|�j|j�jd�|�j|j�jd�y)Nc�0��eZdZUeW�d��Zeed<y)�5TestCase.test_default_factory_with_no_init.<locals>.CFrr8N)rrrrGr8r�r;��factorys�rr%rcs����G�%�@�A�t�@rr%rCrM�rr(r8r)�
call_count�r-r%rs  @r�!test_default_factory_with_no_initz*TestCase.test_default_factory_with_no_init_sd����&��	�	A�	A�
�	A�	
��������+�+�Q�/�	��������+�+�Q�/rc�t��t��tG�fd�d��}|�j|j�jd�|j|d�jd�|j�jd�|�j|j�jd�y)Nc�.��eZdZUeW���Zeed<y)�BTestCase.test_default_factory_not_called_if_value_given.<locals>.Cr�r8Nr�rs�rr%r qs����7�3�A�s�3rr%rCr�rMrrs  @r�.test_default_factory_not_called_if_value_givenz7TestCase.test_default_factory_not_called_if_value_givenms�����&��	�	4�	4�
�	4�
	
��������+�+�Q�/�����2����"�%�����+�+�Q�/�	��������+�+�Q�/rc��tGd�d��}tGd�d|��}|j|�ji�|j|�ji�|j|�jd�tGd�d|��}|j|�ji�y)Nc�*�eZdZUee��Zeed<y)�2TestCase.test_default_factory_derived.<locals>.Foor�r8N)rrrrGr�r8r;rrr�Foor$�s���D�1�A�t�1rr%c��eZdZUdZeed<y)�2TestCase.test_default_factory_derived.<locals>.BarrCr�N�rrrr�r:r;rrr�Barr'�����A�s�Jrr)rCc��eZdZy)�2TestCase.test_default_factory_derived.<locals>.BazNrrrr�Bazr,�r&rr-)r(r)r8r�)r-r%r)r-s    r�test_default_factory_derivedz%TestCase.test_default_factory_derived~s���	�	2�	2�
�	2�
�	�#�	�
�	�	
�������"�%��������"�%��������!�$�	�	�#�	�
�	��������"�%rc��tGd�d��}Gd�d|�}tGd�d|��}|dd�}|j|j|jfd	�|j	t
d
�5|jddd�Gd�d|�}|d
d�}|j|j|jfd�y#1swY�FxYw)Nc��eZdZUeed<y)�3TestCase.test_intermediate_non_dataclass.<locals>.Ar8Nr9rrrr�r1�r<rr�c��eZdZUeed<y)�3TestCase.test_intermediate_non_dataclass.<locals>.Br�Nr9rrrr�r3�����Frr�c��eZdZUeed<y)�3TestCase.test_intermediate_non_dataclass.<locals>.Cr�Nr9rrrr%r6�r<rr%rCr�)rCr�zobject has no attributec��eZdZUeed<y)�3TestCase.test_intermediate_non_dataclass.<locals>.Dr�Nr9rrrrbr8�r4rrbr�r�)r�r�)r(r)r8r�rH�AttributeErrorr�)r-r�r�r%r�rbr�s       r�test_intermediate_non_dataclassz(TestCase.test_intermediate_non_dataclass�s���
�	�	�
�	�	��	�
�	��	�
�	�
�a��G�����!�#�#�q�s�s��V�,��
#�
#�N�$=�?�	�
�C�C�	�
	��	�
�a��G�����!�#�#�q�s�s��V�,�	�	�s�:
C�Cc��|jtd�5tGd�d��}ddd�y#1swYyxYw)Nr�c�0�eZdZUee��Zeeed<y)�1TestCase.test_classvar_default_factory.<locals>.Cr�r8Nr�rrrr%r=�r�rr%�rHr�r(r�s  r�test_classvar_default_factoryz&TestCase.test_classvar_default_factory�sB��
�
#�
#�I�$C�E�	>�
�
>�
>��
>�	>�	>�	>���4�=c���Gd�d�}|jtd��|jtt��|jt|��|jt|���tGd�d���tG�fd�d��}�d�}||d	�}|j	t���|j	t|��|jt|j
��|j	t|j��|jt|j��y)
Nc��eZdZy)�0TestCase.test_is_dataclass.<locals>.NotDataClassNrrrr�NotDataClassrC�r_rrDrc��eZdZUeed<y)�%TestCase.test_is_dataclass.<locals>.Cr8Nr9rrrr%rF�r<rr%c�&��eZdZUW�ed<eed<y)�%TestCase.test_is_dataclass.<locals>.Dr��eN�rrrr;r:)r%s�rrbrH�s
����D��Frrbr�r�)r��is_dataclassr:r(rvr8r�rI)r-rDrbr�r�r%s     @r�test_is_dataclasszTestCase.test_is_dataclass�s���	�	�	
����a��)�����c�*�+�����l�3�4�����l�n�5�6�	�	�	�
�	�
�	�	�
�	�
�b�E��
�a��G������Q��(�����Q��(�����a�c�c�*�+�����Q�S�S�)�*�����a�c�c�*�+rc�f�Gd�d�}|jt|��|�}Gd�d�}|�}g|_||fD]�}|j|��5|jt|��|j	t
d�5t
|�ddd�|j	t
d�5t|�ddd�|j	t
d�5t|d��ddd�ddd���y#1swY�jxYw#1swY�LxYw#1swY�,xYw#1swY��xYw)	Nc��eZdZd�Zy)�ATestCase.test_is_dataclass_when_getattr_always_returns.<locals>.Ac��yr�r)r-�keys  r�__getattr__zMTestCase.test_is_dataclass_when_getattr_always_returns.<locals>.A.__getattr__�rXrN)rrrrRrrrr�rO�s��
rr�c��eZdZy)�ATestCase.test_is_dataclass_when_getattr_always_returns.<locals>.BNrrrrr�rT�r_rr�)�objz'should be called on dataclass instancesrr~)	r�rKrcr2rHr��asdictr�replace)r-r�r%r�rrUs      r�-test_is_dataclass_when_getattr_always_returnsz6TestCase.test_is_dataclass_when_getattr_always_returns�s��	�	�	
����a��)�
�C��	�	�
�C��!#����a�4�
	&�C����#��&�	
&�� � ��c�!2�3��+�+�I�7`�a� ��3�K� ��+�+�I�7`�a�!��C�L�!��+�+�I�7`�a�&��C�1�%�&�	
&�	
&�
	&�
 � ��!�!��&�&��	
&�	
&�sT�1D'�D�D'�8D�D'�"D�0D'�D�D'�D�D'�D$� D'�'D0	c��tGd�dtj��}|jt	|��|t
t�}|jt	t|���|jt	|��y)Nc�"�eZdZUeed<eed<y)�2TestCase.test_is_dataclass_genericalias.<locals>.A�origin�argsN)rrrrXr;rrrr�r[�s���L��Jrr�)r(�types�GenericAliasrvrKr�r:rX�r-r�r%s   r�test_is_dataclass_genericaliasz'TestCase.test_is_dataclass_genericalias�sc��	�	��"�"�	�
�	�	
����Q��(�
�d�C�L������T�!�W�-�.�����Q��(rc	��tGd�d��}|jt|�t|dd���y)Nc�"�eZdZUeed<eed<y)�:TestCase.test_helper_fields_with_class_instance.<locals>.Cr8r�N)rrrr:r;r,rrrr%rd�s���F��Hrr%rg)r(r)r+r�s  r�&test_helper_fields_with_class_instancez/TestCase.test_helper_fields_with_class_instance�s<��
�	�	�
�	�	
������F�1�Q��9�$5�6rc�f�|jtd�5td�ddd�Gd�d�}|jtd�5t|�ddd�|jtd�5t|��ddd�y#1swY�mxYw#1swY�ExYw#1swYyxYw)Nzdataclass type or instancerc��eZdZy)�0TestCase.test_helper_fields_exception.<locals>.CNrrrrr%rhrrr%)rHr�r+r�s  r�test_helper_fields_exceptionz%TestCase.test_helper_fields_exceptions����
#�
#�I�/K�
L�	��1�I�	�	�
�
�
#�
#�I�/K�
L�	��1�I�	�
�
#�
#�I�/K�
L�	��1�3�K�	�	�
	�	��	�	��	�	�s#�B�B�5B'�B�B$�'B0c��tj�}	tt�|j�}|jd|�|jd|�y#t$r!}tj||��Yd}~�Zd}~wwxYw)N)�filer9rc)	�io�StringIOr+r�r��	traceback�print_exception�getvaluer)r-�stdout�exc�printed_tracebacks    r�*test_clean_traceback_from_fields_exceptionz3TestCase.test_clean_traceback_from_fields_exceptionsq�������	8��6�N�#�O�O�-�����)�+<�=����/�1B�C��	�	8��%�%�c��7�7��	8�s�A�	B�#A?�?Bc��tGd�d��}|dd�}|jt|�ddd��|jt|�t|��|jt|�t|��d|_|jt|�ddd��|jt
t|��t�y)Nc�"�eZdZUeed<eed<y)�&TestCase.test_helper_asdict.<locals>.Cr8r�Nr9rrrr%rwrJrr%rCrMr�r=)r(r)rVrr8r�rXr�r�s   r�test_helper_asdictzTestCase.test_helper_asdicts���	�	�	�
�	�
�a��G��������!�!�$4�5�������F�1�I�.�������F�1�I�.����������"�1�$5�6��
�
�d�6�!�9�o�t�,rc�
�tGd�d��}|jtd�5t|�ddd�|jtd�5tt�ddd�y#1swY�8xYw#1swYyxYw)Nc�"�eZdZUeed<eed<y)�8TestCase.test_helper_asdict_raises_on_classes.<locals>.Cr8r�Nr9rrrr%r{'rJrr%�dataclass instance)r(rHr�rVr:r�s  r�$test_helper_asdict_raises_on_classesz-TestCase.test_helper_asdict_raises_on_classes%sz��	�	�	�
�	��
#�
#�I�/C�
D�	��1�I�	�
�
#�
#�I�/C�
D�	��3�K�	�	�	�	��	�	���A-�A9�-A6�9Bc�0�tGd�d��}g}|d|�}t|�}|j|d|�|j|d|�|d�}t|�}|dj	d�|j|j
g�y)Nc�:�eZdZUeed<ee��Zeeed<y)�2TestCase.test_helper_asdict_copy_values.<locals>.Cr8r�r�N�	rrrr:r;rGr�r�rrrrr%r�1����F� ��6�A�t�C�y�6rr%rCr�)r(rVr)r�appendr�)r-r%�initialr�r�s     r�test_helper_asdict_copy_valuesz'TestCase.test_helper_asdict_copy_values0s���	�	7�	7�
�	7���
�a��M���1�I������3���)�����3���)�
�a�D���1�I��	�#��
�
�a��������b�!rc�h��tGd�d���tG�fd�d��}|d�dd��}t|�}|j|dddd�d	��|jt|�t|��d
|j_|jt|�ddd
d�d	��y)Nc�"�eZdZUeed<eed<y)�2TestCase.test_helper_asdict_nested.<locals>.UserId�token�groupNr9rrr�UserIdr�@����J��Jrr�c�&��eZdZUeed<W�ed<y)�0TestCase.test_helper_asdict_nested.<locals>.UserrPrONr��r�s�r�Userr�D�
����I��Jrr��Joe�{rC)r�r��rPrOrM)r(rVr)rrOr�)r-r��ur�r�s    @r�test_helper_asdict_nestedz"TestCase.test_helper_asdict_nested?s����	�	�	�
�	�
�	�	�
�	�
���s�A��'���1�I������U�C�!�2L�M�N�������F�1�I�.�����
�������U�58�1�+E�%G�	Hrc��	�tGd�d���	tG�	fd�d��}tG�	fd�d��}tG�	fd�d��}�	d	d
�}�	dd�}|d
||g�}|d
||f�}|d
||d��}|jt|�d
d	d
d�ddd�gd��|jt|�d
d	d
d�ddd�fd��|jt|�d
d	d
d�ddd�d�d��y)Nc�"�eZdZUeed<eed<y)�<TestCase.test_helper_asdict_builtin_containers.<locals>.UserrPrON�rrrr�r;r:rrrr�r�Q����I��Grr�c�,��eZdZUeed<eW�ed<y)�ATestCase.test_helper_asdict_builtin_containers.<locals>.GroupListrO�usersN�rrrr:r;r�r�s�r�	GroupListr�U�����G���:�rr�c�0��eZdZUeed<eW�dfed<y)�BTestCase.test_helper_asdict_builtin_containers.<locals>.GroupTuplerO.r�N�rrrr:r;r	r�s�r�
GroupTupler�Y�����G���s��#�#rr�c�0��eZdZUeed<eeW�fed<y)�ATestCase.test_helper_asdict_builtin_containers.<locals>.GroupDictrOr�N�rrrr:r;r
r�r�s�r�	GroupDictr�]�����G���T�	�?�"rr��AlicerC�BobrMr�r��secondr�)rOr��r(r)rV�
r-r�r�r�r%r�gl�gt�gdr�s
         @r�%test_helper_asdict_builtin_containersz.TestCase.test_helper_asdict_builtin_containersPsI���	�	�	�
�	�
�	�	�
�	�
�	$�	$�
�	$�
�	#�	#�
�	#�
��!������N��
�q�1�a�&�
!��
��A�q�6�
"��
�q�A��3�
4��������A�'�QR�9S�BG�q�9Q�9S�&T�	U�������A�'�QR�9S�BG�q�9Q�9S�&T�	U�������A�7�Z[�B\�LQ�YZ�C[�9]�&^�	_rc
���tGd�d���tG�fd�d��}|jt|�dg���dddgii�|jt|�ddi���ddddiii�y)	Nc��eZdZUeed<y)�DTestCase.test_helper_asdict_builtin_object_containers.<locals>.Childr�N�rrrr�r;rrr�Childr�n����Irr�c���eZdZUW�ed<y)�ETestCase.test_helper_asdict_builtin_object_containers.<locals>.Parent�childNr�r�s�r�Parentr�r�����Lrr�rCr�r�rMr��r-r�r�s  @r�,test_helper_asdict_builtin_object_containersz5TestCase.test_helper_asdict_builtin_object_containersms����	�	�	�
�	�
�	�	�
�	�	
�����u�a�S�z� 2�3�g��a�S�z�5J�K������u�a��V�}� 5�6��3��A��-�8P�Qrc��tGd�d��}|dd�}t|t��}|j|tddg��|j	|t|t���d|_t|t��}|j|td	dg��|j
t|�t�y)
Nc�"�eZdZUeed<eed<y)�.TestCase.test_helper_asdict_factory.<locals>.Cr8r�Nr9rrrr%r�zrJrr%rCrM��dict_factory)r8rC)r�rMr=)r8r=)r(rVrr)rr8r�rX�r-r%r�r�s    r�test_helper_asdict_factoryz#TestCase.test_helper_asdict_factoryys���	�	�	�
�	�
�a��G���1�;�/������K��8�(<�=�>�����F�1�;�?�@�����1�;�/������K��H�(=�>�?��
�
�d�1�g�{�+rc����tdd��tG�fd�d��}|d�d|d�dd	d
��d��}t|�}|j|d�dd�dd	d
�d�d�d��t|t�
�}|j|d�dd�dd	d
�d�d�d��|jt
|�t�|jt
|dd�t�y)N�T�a b cc�&��eZdZUeed<W�ed<y)�1TestCase.test_helper_asdict_namedtuple.<locals>.Cr8r�Nr��r�s�rr%r���
����F��Drr%�outerrC�innerr���
rMr�r�r�)rr(rVr)rr�rX)r-r%r�r�r�s    @r�test_helper_asdict_namedtuplez&TestCase.test_helper_asdict_namedtuple�s�����s�G�$��	�	�	�
�	�
�g�q��A�g�q��R��}�5�q�9�:���1�I������'�"#�A�*1�*+�B��B�-�%9�$%�#'��	�
�1�;�/������'�"#�A�*1�*+�B��B�-�%9�$%�#'��	�	
�
�
�d�1�g�{�+��
�
�d�1�S�6�!�9�o�{�3rc��tGd�d��}tdd�}||d�di�}|jt|�d|d��dii�y)	Nc��eZdZUeed<y)�5TestCase.test_helper_asdict_namedtuple_key.<locals>.Cr�N)rrrr�r;rrrr%r��s���Grr%r�r%zan arr��r%)r(rr)rV)r-r%r�r�s    r�!test_helper_asdict_namedtuple_keyz*TestCase.test_helper_asdict_namedtuple_key�s[��
�	�	�
�	��s�C� ��
�q��y�!�n���������S�1�v�;��*:�$;�<rc�6��Gd�dtdd���tG�fd�d��}�d�}||�}t|�}|j|d�d�	�i�|j	|d|�|j|dj�d�y)
Nc��eZdZd�Zy)�9TestCase.test_helper_asdict_namedtuple_derived.<locals>.Tc��|jSr�r�r�s r�my_az>TestCase.test_helper_asdict_namedtuple_derived.<locals>.T.my_a�����v�v�
rN)rrrr�rrrr�r�����
rr��Tbaser%c���eZdZUW�ed<y)�9TestCase.test_helper_asdict_namedtuple_derived.<locals>.Cr�Nrr�s�rr%r�������Drr%rr�r�)rr(rVr)rr�)r-r%r�r�r�r�s     @r�%test_helper_asdict_namedtuple_derivedz.TestCase.test_helper_asdict_namedtuple_derived�s����	�
�7�C�(�	�
�	�	�
�	�
�a�D��
�a�D���1�I������S�!�a�&�M�*�����3���#�����3������*rc��tGd�d��}tt�}|djd�||��}t	|�}|j|dddgii�|j
|d|ju�y)Nc�"�eZdZUeeefed<y)�2TestCase.test_helper_asdict_defaultdict.<locals>.C�mpN�rrrrr�rr;rrrr%r������C��I�&�&rr%r8r��r�r�)r(rr�r�rVr)rvr�)r-r%�ddr�r�s     r�test_helper_asdict_defaultdictz'TestCase.test_helper_asdict_defaultdict�s}��
�	'�	'�
�	'���
��
�3����r��
��H���1�I������T�C�"��;�/�0�����$��q�t�t�+�,rc��tGd�d��}|d�}|jt|�d�|jt|�t|��|jt|�t|��d|_|jt|�d�|jt
t|��t�y)Nc�&�eZdZUeed<dZeed<y)�'TestCase.test_helper_astuple.<locals>.Cr8rr�Nr�rrrr%r��r�rr%rC)rCrr=)rCr=)r(r)rrr�r�rXr�r�s   r�test_helper_astuplezTestCase.test_helper_astuple�s���	�	�	�
�	�
�a�D��������V�,�������W�Q�Z�0�������W�Q�Z�0����������W�-��
�
�d�7�1�:�&��.rc�
�tGd�d��}|jtd�5t|�ddd�|jtd�5tt�ddd�y#1swY�8xYw#1swYyxYw)Nc�"�eZdZUeed<eed<y)�9TestCase.test_helper_astuple_raises_on_classes.<locals>.Cr8r�Nr9rrrr%r��rJrr%r|)r(rHr�rr:r�s  r�%test_helper_astuple_raises_on_classesz.TestCase.test_helper_astuple_raises_on_classes�sz��	�	�	�
�	��
#�
#�I�/C�
D�	��A�J�	�
�
#�
#�I�/C�
D�	��C�L�	�	�	�	��	�	�r~c�0�tGd�d��}g}|d|�}t|�}|j|d|�|j|d|�|d�}t|�}|dj	d�|j|j
g�y)Nc�:�eZdZUeed<ee��Zeeed<y)�3TestCase.test_helper_astuple_copy_values.<locals>.Cr8r�r�Nr�rrrr%r��r�rr%rC)r(rr)rr�r�)r-r%r�r�r�s     r�test_helper_astuple_copy_valuesz(TestCase.test_helper_astuple_copy_values�s���	�	7�	7�
�	7���
�a��M���A�J������1��w�'�����1��w�'�
�a�D���A�J��	�!����A��������b�!rc�P��tGd�d���tG�fd�d��}|d�dd��}t|�}|j|d�|jt|�t|��d	|j_|jt|�d
�y)Nc�"�eZdZUeed<eed<y)�3TestCase.test_helper_astuple_nested.<locals>.UserIdr�r�Nr9rrrr�rr�rr�c�&��eZdZUeed<W�ed<y)�1TestCase.test_helper_astuple_nested.<locals>.UserrPrONr�r�s�rr�rr�rr�r�r�rC)r�)r�rCrM)r�)r�rM)r(rr)rrOr�)r-r�r�r�r�s    @r�test_helper_astuple_nestedz#TestCase.test_helper_astuple_nested�s����	�	�	�
�	�
�	�	�
�	�
���s�A��'���A�J������-�.�������W�Q�Z�0�����
�������%6�7rc���	�tGd�d���	tG�	fd�d��}tG�	fd�d��}tG�	fd�d��}�	d	d
�}�	dd�}|d
||g�}|d
||f�}|d
||d��}|jt|�d
ddgf�|jt|�d�|jt|�d
ddd�f�y)Nc�"�eZdZUeed<eed<y)�=TestCase.test_helper_astuple_builtin_containers.<locals>.UserrPrONr�rrrr�rr�rr�c�,��eZdZUeed<eW�ed<y)�BTestCase.test_helper_astuple_builtin_containers.<locals>.GroupListrOr�Nr�r�s�rr�r	r�rr�c�0��eZdZUeed<eW�dfed<y)�CTestCase.test_helper_astuple_builtin_containers.<locals>.GroupTuplerO.r�Nr�r�s�rr�rr�rr�c�0��eZdZUeed<eeW�fed<y)�BTestCase.test_helper_astuple_builtin_containers.<locals>.GroupDictrOr�Nr�r�s�rr�r
r�rr�r�rCr�rMrr��r�rC�r�rM)r)rr�r(r)rr�s
         @r�&test_helper_astuple_builtin_containersz/TestCase.test_helper_astuple_builtin_containerss���	�	�	�
�	�
�	�	�
�	�
�	$�	$�
�	$�
�	#�	#�
�	#�
��!������N��
�q�1�a�&�
!��
��A�q�6�
"��
�q�A��3�
4��������q�<��*D�&E�F�������&E�F�������q�L�J�*W�&X�Yrc
���tGd�d���tG�fd�d��}|jt|�dg���dgff�|jt|�ddi���ddiff�y)Nc��eZdZUeed<y)�ETestCase.test_helper_astuple_builtin_object_containers.<locals>.Childr�Nr�rrrr�r*r�rr�c���eZdZUW�ed<y)�FTestCase.test_helper_astuple_builtin_object_containers.<locals>.Parentr�Nrr�s�rr�r.r�rr�rCrMrr�s  @r�-test_helper_astuple_builtin_object_containersz6TestCase.test_helper_astuple_builtin_object_containers)s����	�	�	�
�	�
�	�	�
�	�	
������q�c�
�!3�4���v�i�@�������q�!�f�
�!6�7�A�q�6�)��Frc�v��tGd�d��}tdd���fd�}|dd�}t||��}|j|�dd��|j	|t||���d	|_t||��}|j|�d	d��|j
t|���y)
Nc�"�eZdZUeed<eed<y)�/TestCase.test_helper_astuple_factory.<locals>.Cr8r�Nr9rrrr%r6rJrr%�NTzx yc����|�Sr�r)rrs �r�ntz0TestCase.test_helper_astuple_factory.<locals>.nt;s����s�8�OrrCrM��
tuple_factoryr=)r(rrr)rr8r�rX)r-r%rr�r�rs     @r�test_helper_astuple_factoryz$TestCase.test_helper_astuple_factory5s����	�	�	�
�	���e�
$��	�
�a��G���A�R�(������B�q�!�H�%�����G�A�R�8�9�����A�R�(������B�r�1�I�&��
�
�d�1�g�r�"rc�D��tdd��tG�fd�d��}|d�d|d�dd	d
��d��}t|�}|j|d�ddd�f�t|t�
�}|j|d�dd�dd	d
�gd�g�y)Nr�r�c�&��eZdZUeed<W�ed<y)�2TestCase.test_helper_astuple_namedtuple.<locals>.Cr8r�Nr�r�s�rr%r#Hr�rr%r�rCr�r�r�r�rM)r�)r�r�r�r)rr(rr)r�)r-r%r�r�r�s    @r�test_helper_astuple_namedtuplez'TestCase.test_helper_astuple_namedtupleFs�����s�G�$��	�	�	�
�	�
�g�q��A�g�q��R��}�5�q�9�:���A�J������W�a��+B�A�&F�G�H�
�A�T�*������W�a��G�Q�r�2�r�]�+C�Q�&G�H�Irc���tGd�d��}tt�}|djd�||��}t	|�}|j|ddgif�|j
|d|u�y)Nc�"�eZdZUeeefed<y)�3TestCase.test_helper_astuple_defaultdict.<locals>.Cr�Nr�rrrr%r'Xr�rr%r8r�r�r)r(rr�r�rr)rv)r-r%r�r�r�s     r�test_helper_astuple_defaultdictz(TestCase.test_helper_astuple_defaultdictUsu��
�	'�	'�
�	'���
��
�3����r��
��H���A�J������c�B�4�[�N�+�����!��B��'rc��dttd�i}tdd|�}t|�}|j||�|jt	|dd��ddd��y)Nr;r�r%rrCrM)r:rXr(r)rV�r-�cls_dictrr�cls1s    r�test_dynamic_class_creationz$TestCase.test_dynamic_class_creationds^��%�S�s�';����3��H�%����~������s�#������A�q�	�*�!�!�,<�=rc���ttd�td��d�}tdd|�}t|�}|j	||�|j	t|d��ddd��y)Nr�r�r�)r;r�r%rrC)r:rGrXr(r)rVr*s    r�'test_dynamic_class_creation_using_fieldz0TestCase.test_dynamic_class_creation_using_fieldqsa��-0�s�';��q�)���
�3��H�%����~������s�#������Q�����*:�;rc�X��tGd�d��}g��fd�}||_|dd�}|jd�d�|jd�d�|jdgf�d	�|jd
gf�d�|jd��|jd
�d�y)Nc��eZdZUeed<e�Zeed<eed��Zeed<ee��Z	eed<edd�	�Z
eed
<dZeed<y)
�&TestCase.test_init_in_order.<locals>.Cr%rFrr�r�r�r�r:rIr�N)rrrr:r;rGrr�r�r�rIr�rrrr%r2�sM���F��W�A�s���D�u�=�A�t�=��D�1�A�t�1��1�5�1�A�s�1��A�s�Jrr%c�,���j||f�yr�)r�)r-rP�value�callss   �r�setattrz,TestCase.test_init_in_order.<locals>.setattr�s����L�L�$���'rrrC)r%r)rrCr�rMr�r�)rIr�)r�r�r�)r(�__setattr__r)r)r-r%r6r�r5s    @r�test_init_in_orderzTestCase.test_init_in_orders����	�	�	�
�	���	(� ��
�
�a��G������5��8�,�����5��8�,����#�r��E�!�H�-����#�r��E�!�H�-�����5�)�����5��8�,rc��tGd�d��}|d�}|jd|j�|jd|j�|jd|j�|jd|j�|j	|j
d�|jd	|j�|j	|jd�|jd|j�|j	|jd�|jd|j�|j	|jg�|jd|j�|j	|jg�|jd|j�|jd	|j�|j	|jd�y)
Nc�~�eZdZUeed<eed��Zeed<ee��Zeed<edd��Z	eed	<d
Z
eed<y)
�'TestCase.test_items_in_dicts.<locals>.Cr%Frrr�r�r�r:r�rrIN)rrrr:r;rGr�rr�r�rIrrrr%r;�sA���F��D�u�=�A�t�=��D�1�A�t�1��1�5�1�A�s�1��A�s�Jrr%rr%rr�r�r�rI)
r(rrrYr)r�rIr%rr�r�s   r�test_items_in_dictszTestCase.test_items_in_dicts�sX��	�	�	�
�	�
�a�D������a�j�j�)�����a�j�j�)�����a�j�j�)��
�
�c�1�:�:�&�������a� ��
�
�c�1�:�:�&�������a� ��
�
�c�1�:�:�&�������a� ��
�
�c�1�:�:�&�������b�!��
�
�c�1�:�:�&�������b�!�����a�j�j�)��
�
�c�1�:�:�&�������a� rc��tGd�d��}|j|jd�jd�y)Nc�(�eZdZUeed<ed��Zy)�:TestCase.test_alternate_classmethod_constructor.<locals>.Cr8c��d}||�S)Nr�r)rr�filename�
value_in_files   r�	from_filezDTestCase.test_alternate_classmethod_constructor.<locals>.C.from_file�s��!#�
��=�)�)rN)rrrr:r;r�rCrrrr%r?�s���F�
�
*��
*rr%rAr�)r(r)rCr8r�s  r�&test_alternate_classmethod_constructorz/TestCase.test_alternate_classmethod_constructor�s<��
�	*�	*�
�	*�	
������Z�0�2�2�B�7rc�f�tGd�d��}|jt|�dj�|j	tt|�dj�d�|j
td�5dt|�djd<ddd�y#1swYyxYw)Nc��eZdZUeed<y)�/TestCase.test_field_metadata_default.<locals>.Cr3Nr9rrrr%rG�r<rr%r� does not support item assignmentr��test)r(r�r+�metadatar)r*rHr�r�s  r�test_field_metadata_defaultz$TestCase.test_field_metadata_default�s���
�	�	�
�	�	
������1��.�.�/�����V�A�Y�q�\�2�2�3�Q�7�
�
#�
#�I�$F�H�	.�,-�F�1�I�a�L�!�!�&�)�	.�	.�	.�s�B'�'B0c�"��|jt�5tGd�d��}ddd�i�tG�fd�d��}|jt	|�dj
�|j
tt	|�dj
�d�d�d<|j
tt	|�dj
�d�|j
t	|�dj
dd�|jtd�5dt	|�dj
d	<ddd�d
ddd
��tG�fd�d��}|j
tt	|�dj
�d�|j
t	|�dj
d	d
�|j
t	|�dj
dd�|j
t	|�dj
dd�d�d<|j
tt	|�dj
�d�|j
t	|�dj
dd�|jt�5t	|�dj
dddd�|jtd�5dt	|�dj
d	<ddd�y#1swY���xYw#1swY���xYw#1swY�^xYw#1swYyxYw)Nc�*�eZdZUed��Zeed<y)�/TestCase.test_field_metadata_mapping.<locals>.Cr�rJr3N�rrrrGr3r:r;rrrr%rN�s����*��3�*rr%c�.��eZdZUeW���Zeed<y�rNrOr3NrP�r�s�rr%z/TestCase.test_field_metadata_mapping.<locals>.C������A�&�A�s�&rrrCr�rHr�rIr��42�three)rIr[r�c�.��eZdZUeW���Zeed<yrRrPrSs�rr%z/TestCase.test_field_metadata_mapping.<locals>.C�rTrr[r��baz)
r�r�r(r�r+rJr)r*rH�KeyError)r-r%r�s  @r�test_field_metadata_mappingz$TestCase.test_field_metadata_mapping�s�����
�
�y�
)�	+�
�
+�
+��
+�	+�
��	�	'�	'�
�	'�������1��.�.�/�����V�A�Y�q�\�2�2�3�Q�7���%������V�A�Y�q�\�2�2�3�Q�7�������1��.�.�u�5�q�9�
�
#�
#�I�$F�H�	.�,-�F�1�I�a�L�!�!�&�)�	.�
���1��	�	'�	'�
�	'�����V�A�Y�q�\�2�2�3�Q�7�������1��.�.�v�6��;�������1��.�.�u�5�t�<�������1��.�.�q�1�7�;���%������V�A�Y�q�\�2�2�3�Q�7�������1��.�.�u�5�q�9�
�
�
�x�
(�	)��1�I�a�L�!�!�%�(�	)��
#�
#�I�$F�H�	.�,-�F�1�I�a�L�!�!�&�)�	.�	.�I	+�	+�� 	.�	.��"	)�	)��	.�	.�s/�K�K,�K9�:L�K)�,K6�9L�Lc����Gd�d��tG�fd�d��}|jtt|�dj�d�|jt|�djdd�|jt�5t|�djd	ddd�|jt|�djd
d�y#1swY�5xYw)Nc��eZdZd�Zd�Zd�Zy)�DTestCase.test_field_metadata_custom_mapping.<locals>.SimpleNameSpacec�:�|jj|�yr�)r�update)r-�kws  rr�zMTestCase.test_field_metadata_custom_mapping.<locals>.SimpleNameSpace.__init__�s���
�
�$�$�R�(rc�&�|dk(ryt||�S)N�xyzzy�plugh)r)r-�items  r�__getitem__zPTestCase.test_field_metadata_custom_mapping.<locals>.SimpleNameSpace.__getitem__s���7�?�"��t�T�*�*rc�6�|jj�Sr�)r�__len__r�s rrgzLTestCase.test_field_metadata_custom_mapping.<locals>.SimpleNameSpace.__len__s���}�}�,�,�.�.rN)rrrr�rergrrr�SimpleNameSpacer]�s��
)�
+�

/rrhc�<��eZdZUeW�d����Zeed<y)�6TestCase.test_field_metadata_custom_mapping.<locals>.Cr�r�rOr3NrP)rhs�rr%rj	s����O�b�$9�:�A�s�:rr%rrCr%r�rrbrc)r(r)r*r+rJr�r9)r-r%rhs  @r�"test_field_metadata_custom_mappingz+TestCase.test_field_metadata_custom_mapping�s����
	/�
	/�
�	;�	;�
�	;�	
����V�A�Y�q�\�2�2�3�Q�7�������1��.�.�s�3�R�8�
�
�
�~�
.�	'��1�I�a�L�!�!�#�&�	'�	
������1��.�.�w�7��A�	'�	'�s�C"�"C+c���td��tG�fd�dt���}|d�}|j|jd�|j|j
d�t|t}y)Nr�c�*��eZdZUW�ed<dZeed<y)�5TestCase.test_generic_dataclasses.<locals>.LabeledBox�content�	<unknown>�labelN)rrrr;rqr�r�s�r�
LabeledBoxrns����J�$�E�3�$rrrr=rp)rr(rr)rorqrr:)r-rr�box�Aliasr�s    @r�test_generic_dataclassesz!TestCase.test_generic_dataclassessl����C�L��	�	%����	%�
�	%���n��������b�)�������K�0��Z��_�%�rc����td��td��tG��fd�dt��f��}tGd�d|t�f��}|t}|ddd	�}|jt
|�d
�Gd�d|t�f�}|t}|d
d�}|j|j�d�y)N�Sr�c�(��eZdZUW�ed<W�ed<y)�-TestCase.test_generic_extending.<locals>.Baser8r�Nr)rwr�s��rr�ry's
����D��Drr�c��eZdZUeed<y)�4TestCase.test_generic_extending.<locals>.DataDerived�	new_fieldNr�rrr�DataDerivedr{,s���Nrr}r�test1�test2)rr~rc��eZdZd�Zy)�7TestCase.test_generic_extending.<locals>.NonDataDerivedc��|jSr�r�r�s r�
new_methodzBTestCase.test_generic_extending.<locals>.NonDataDerived.new_method4r�rN)rrrr�rrr�NonDataDerivedr�3r�rr�r���?)	rr(rr:r�r)rr,r�)r-r�r}rtr�r�rwr�s      @@r�test_generic_extendingzTestCase.test_generic_extending#s�����C�L���C�L��	�	�7�1�a�4�=�	�
�	�
�	�$�s�A�v�,�	�
�	��C� ���!�W�g�&��������%:�;�	�T�#�q�&�\�	��u�%���"�c�N����������-rc�b��td��tG�fd�dt���}tdd�fdt�dfg|t
t�fddi�	�}|j
|t
d
d�jd�|j|t
d
dd�jd�|j|t
d
dd�jd�|�}|j|t
d
d�jd
�|j|j||ttf�y)
Nr�c���eZdZUW�ed<y)�-TestCase.test_generic_dynamic.<locals>.Parentr8Nrr�s�rr�r�=r�rr�r�r�r�r�r=)�bases�	namespacerCrMr�)
rr(rrr
r:r�r�r)r�r8�__mro__r�)r-r�r�rtr�s    @r�test_generic_dynamiczTestCase.test_generic_dynamic:s����C�L��	�	�W�Q�Z�	�
�	��w�#�q��C��!��d�3K�(L�&,�S�k�7�1�:�%>�7�TV�-�Y���
�
�j�e�C�j��A�&�(�(�$�/������s��A�q�!�,�.�.��2������s��A�q�!�,�2�2�B�7��a��������s��A�q�)�+�+�Q�/�����������(H�Irc
��tGd�d��atGd�d��atGd�d��atd�}d|_td�tdd�td�|td�tdgd	��g}|D�]E}ttjdz�D�]"}|j||�
�5t
jt
j||��}|j|j|j�|j|j|j�|j||�d|_t
jt
j||��}|j|j|j�|j|j|j�ddd���%��Hy#1swY��4xYw)Nc�&�eZdZUeed<dZeed<y)�Pr8rr�Nr�rrrr�r�Mr�rr�c�6�eZdZUeed<edd��Zeed<y)�Qr8rFr:r�N�rrrr:r;rGr�rrrr�r�Qs���F��1�5�1�A�s�1rr�c�:�eZdZUeed<ee��Zeeed<y)�Rr8r�r�Nr�rrrr�r�Ur�rr�rCrM)rMr�r�)�sample�protor=)r(r�r�r�r��range�pickle�HIGHEST_PROTOCOLr2�loads�dumpsr)r8r)r-�q�samplesr�r��
new_sample�another_new_samples       r�test_dataclasses_pickleablez$TestCase.test_dataclasses_pickleableKs���	�	�	�
�	�
�	2�	2�
�	2�
�	7�	7�
�	7�
�a�D������Q�4��1�a��!�A�$��1�Q�4��1�i��A���
	E�F��v�6�6��:�;�	
E���\�\��u�\�=�E�!'���f�l�l�6�5�.I�!J�J��$�$�V�X�X�z�|�|�<��$�$�V�X�X�z�|�|�<��$�$�V�Z�8�#%�J�L�)/���f�l�l�:�u�6U�)V�&��$�$�Z�\�\�3E�3G�3G�H��$�$�V�X�X�/A�/C�/C�D�E�E�	
E�
	E�E�E�s
�>DG�Gc�J�tddd��Gd�d��}|j|jjd�dD]+}|jt	||�j
d|����-|j
td�5|�ddd�y#1swYyxYw)	NT)rr�rhc�"�eZdZUeed<eed<y)�.TestCase.test_dataclasses_qualnames.<locals>.Ar8r�Nr9rrrr�r�irJrr�r�)
r�rzr{r|r}r�r��__repr__r7�__delattr__z/TestCase.test_dataclasses_qualnames.<locals>.A.zA\.__init__\(\) missing)r(r)r�rrrrHr�)r-r��functions   r�test_dataclasses_qualnamesz#TestCase.test_dataclasses_qualnameshs���	��4��	=�	�	�
>�	�	
������,�,�j�9�
�	~�H�
���W�Q��1�>�>�Bq�rz�q{�@|�}�	~��
#�
#�I�/I�
J�	�
�C�	�	�	�s�B�B"N)mrrrr/r4r?rKrUr[rernryrr�r�r�r�r�r�r�r�rrr8rFr_rmr�r�r�r�r�r�r�r�r�r�r�r�rrrr$r?rHrOrQr]rur�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr!r.r:r?rLrXrarerirtrxr}r�r�r�r�r�r�r�r�r�r�r�r�rrrr r$r(r-r/r8r<rDrKrZrkrur�r�r�r�rrrr!r!s3��,�,�"�?�7�1�G�7�
R�"�*�X3�jq�,(�,*�*�(�!�"5�"5�$*�8,�B46�l#�2&C�P
�&�"P� 	0�$�4?�4@�&-�B")�H#� +2�Z"�*&�
2�;�>D�L*�**�,<�&�-�^�>� 
 �9$�v$�8*�	.�
"�$�6*�	.�
"�"�
;�7�47&�r0�0�"&�&-�:>�,�6&�4)�7�
�D�
-�	�
"�H�"_�:
R�,�4�B=�+�$
-�
/�	�
"�8� Z�4
G�#�"
J�
(�>�<�-�.!�:8� .�).�VB�2
&�.�.J�"E�:rr!c��eZdZd�Zd�Zd�Zy)�TestFieldNoAnnotationc��|jtd�5tGd�d��}ddd�y#1swYyxYw)N�)'f' is a field but has no type annotationc��eZdZe�Zy)�>TestFieldNoAnnotation.test_field_without_annotation.<locals>.CN�rrrrGr�rrrr%r���	���G�rr%r>r�s  r�test_field_without_annotationz3TestFieldNoAnnotation.test_field_without_annotation�sB��
�
#�
#�I�$O�Q�	�
�
�
��
�	�	�	�r@c��tGd�d��}|jtd�5tGd�d|��}ddd�y#1swYyxYw)Nc��eZdZUeed<y)�UTestFieldNoAnnotation.test_field_without_annotation_but_annotation_in_base.<locals>.Br�Nr9rrrr�r��r<rr�r�c��eZdZe�Zy)�UTestFieldNoAnnotation.test_field_without_annotation_but_annotation_in_base.<locals>.CNr�rrrr%r��r�rr%�r(rHr�r�s   r�4test_field_without_annotation_but_annotation_in_basezJTestFieldNoAnnotation.test_field_without_annotation_but_annotation_in_base�s_��	�	�	�
�	��
#�
#�I�$O�Q�	��
�A�
��
�	�	�	�s�A�Ac��Gd�d�}|jtd�5tGd�d|��}ddd�y#1swYyxYw)Nc��eZdZUeed<y)�cTestFieldNoAnnotation.test_field_without_annotation_but_annotation_in_base_not_dataclass.<locals>.Br�Nr9rrrr�r��r4rr�r�c��eZdZe�Zy)�cTestFieldNoAnnotation.test_field_without_annotation_but_annotation_in_base_not_dataclass.<locals>.CNr�rrrr%r��r�rr%r>r�s   r�Btest_field_without_annotation_but_annotation_in_base_not_dataclasszXTestFieldNoAnnotation.test_field_without_annotation_but_annotation_in_base_not_dataclass�sR��	�	��
#�
#�I�$O�Q�	��
�A�
��
�	�	�	�s	�?�AN)rrrr�r�r�rrrr�r��s����rr�c�Z�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zy)�
TestDocStringc�h�|j|jdd�|jdd��y)N� �)r)rW)r-r%rs   r�assertDocStrEqualzTestDocString.assertDocStrEqual�s*��	
������3��+�Q�Y�Y�s�B�-?�@rc�b�tGd�d��}|j|jd�y)Nc��eZdZUdZeed<y)�?TestDocString.test_existing_docstring_not_overridden.<locals>.C�Lorem ipsumr8N)rrr�__doc__r:r;rrrr%r��s
����Frr%r�)r(r)r�r�s  r�&test_existing_docstring_not_overriddenz4TestDocString.test_existing_docstring_not_overridden�s/��	�	�	�
�	�	
������M�2rc�b�tGd�d��}|j|jd�y)Nc��eZdZy)�1TestDocString.test_docstring_no_fields.<locals>.CNrrrrr%r��r&rr%zC()�r(r�r�r�s  r�test_docstring_no_fieldsz&TestDocString.test_docstring_no_fields�s/��	�	�	�
�	�	
���q�y�y�%�0rc�b�tGd�d��}|j|jd�y)Nc��eZdZUeed<y)�1TestDocString.test_docstring_one_field.<locals>.Cr8Nr9rrrr%r��r<rr%zC(x:int)r�r�s  r�test_docstring_one_fieldz&TestDocString.test_docstring_one_field�s/��	�	�	�
�	�	
���q�y�y�*�5rc�b�tGd�d��}|j|jd�y)Nc�"�eZdZUeed<eed<y)�2TestDocString.test_docstring_two_fields.<locals>.Cr8r�Nr9rrrr%r��rJrr%zC(x:int, y:int)r�r�s  r�test_docstring_two_fieldsz'TestDocString.test_docstring_two_fields�s0��	�	�	�
�	�	
���q�y�y�*;�<rc�b�tGd�d��}|j|jd�y)Nc�,�eZdZUeed<eed<eed<y)�4TestDocString.test_docstring_three_fields.<locals>.Cr8r�r�N�rrrr:r;r�rrrr%r��rrr%zC(x:int, y:int, z:str)r�r�s  r�test_docstring_three_fieldsz)TestDocString.test_docstring_three_fields�s0��	�	�	�
�	�
	
���q�y�y�*B�Crc�b�tGd�d��}|j|jd�y)Nc��eZdZUdZeed<y)�>TestDocString.test_docstring_one_field_with_default.<locals>.Cr�r8Nr�rrrr%r��r*rr%z
C(x:int=3)r�r�s  r�%test_docstring_one_field_with_defaultz3TestDocString.test_docstring_one_field_with_default�s/��	�	�	�
�	�	
���q�y�y�,�7rc�b�tGd�d��}|j|jd�y)Nc�2�eZdZUdZeeed�fed<y)�CTestDocString.test_docstring_one_field_with_default_none.<locals>.CNr8)rrrr8rr:rXr;rrrr%r��s��(,�A�u�S�$�t�*�_�%�,rr%zC(x:Optional[int]=None)r�r�s  r�*test_docstring_one_field_with_default_nonez8TestDocString.test_docstring_one_field_with_default_none�s0��	�	-�	-�
�	-�	
���q�y�y�*C�Drc�b�tGd�d��}|j|jd�y)Nc��eZdZUeeed<y)�2TestDocString.test_docstring_list_field.<locals>.Cr8N)rrrrr:r;rrrr%r��s���C�y�Lrr%zC(x:List[int])r�r�s  r�test_docstring_list_fieldz'TestDocString.test_docstring_list_field�s0��	�	�	�
�	�	
���q�y�y�*:�;rc�b�tGd�d��}|j|jd�y)Nc�0�eZdZUee��Zeeed<y)�GTestDocString.test_docstring_list_field_with_default_factory.<locals>.Cr�r8N)	rrrrGr�r8rr:r;rrrr%r��s�� ��6�A�t�C�y�6rr%zC(x:List[int]=<factory>)r�r�s  r�.test_docstring_list_field_with_default_factoryz<TestDocString.test_docstring_list_field_with_default_factory�s0��	�	7�	7�
�	7�	
���q�y�y�*D�Erc�b�tGd�d��}|j|jd�y)Nc��eZdZUeed<y)�3TestDocString.test_docstring_deque_field.<locals>.Cr8N)rrrrr;rrrr%r��s���Hrr%zC(x:collections.deque)r�r�s  r�test_docstring_deque_fieldz(TestDocString.test_docstring_deque_field�s0��	�	�	�
�	�	
���q�y�y�*B�Crc�b�tGd�d��}|j|jd�y)Nc�*�eZdZUee��Zeed<y)�HTestDocString.test_docstring_deque_field_with_default_factory.<locals>.Cr�r8N)rrrrGrr8r;rrrr%r��s���U�3�A�u�3rr%z C(x:collections.deque=<factory>)r�r�s  r�/test_docstring_deque_field_with_default_factoryz=TestDocString.test_docstring_deque_field_with_default_factory�s0��	�	4�	4�
�	4�	
���q�y�y�*L�Mrc��Gd�dt�}Gd�d|��}tGd�d|��}|j|jd�y)Nc��eZdZeZy)�<TestDocString.test_docstring_with_no_signature.<locals>.MetaN)rrrr��__call__rrr�Metar��r�rr�c��eZdZy)�<TestDocString.test_docstring_with_no_signature.<locals>.BaseNrrrrr�r�	r_rr�)�	metaclassc��eZdZy)�9TestDocString.test_docstring_with_no_signature.<locals>.CNrrrrr%r�	r&rr%)rXr(r�r�)r-r�r�r%s    r� test_docstring_with_no_signaturez.TestDocString.test_docstring_with_no_signature�sK��	�4�	�	�T�	�
�	��	�
�	�	
���q�y�y�#�.rN)rrrr�r�r�r�r�r�r�r�r�r�r�r�r�rrrr�r��sI��A�3�1�6�=�D�8�E�<�F�D�N�/rr�c�$�eZdZd�Zd�Zd�Zd�Zy)�TestInitc�p�Gd�d�}tGd�d|��}|d�}|j|jd�|jdt	|��td��Gd	�d|��}|�}|j|jd�|j|j
d
�y)Nc��eZdZd�Zy)�&TestInit.test_base_has_init.<locals>.Bc��d|_y�Nr��r�r�s rr�z/TestInit.test_base_has_init.<locals>.B.__init__
	s	����rNr�rrrr�r	s��
rr�c��eZdZUdZeed<y)�&TestInit.test_base_has_init.<locals>.Crr8Nr�rrrr%r		r*rr%r�r�Fr�c��eZdZUdZeed<y)r	r�r8Nr�rrrr%z&TestInit.test_base_has_init.<locals>.C	����A�s�Krr�)r(r)r8rr�r�)r-r�r%r�s    r�test_base_has_initzTestInit.test_base_has_init	s���	�	�
�	��	�
�	�
�b�E��������b�!�����d�1�g�&�
��	�	��	�
�	�
�C��������b�!�������c�"rc���td��Gd�d��}|j|�jd�td��Gd�d��}|j|�jd�y)NFr�c��eZdZUdZeed<y)� TestInit.test_no_init.<locals>.Crr3N)rrrr3r:r;rrrr%r%	r*rr%rc�"�eZdZUdZeed<d�Zy)rrMr3c��d|_y�Nr��r3r�s rr�z)TestInit.test_no_init.<locals>.C.__init__-	r}rN)rrrr3r:r;r�rrrr%z TestInit.test_no_init.<locals>.C*	s���A�s�J�
rr��r(r)r3r�s  r�test_no_initzTestInit.test_no_init$	sh��	��	�	�	�
�	���������"�	��	�	�	�
�	�	
��������"rc�Z�tGd�d��}|j|d�jd�td��Gd�d��}|j|d�jd	�td
��Gd�d��}|j|d�jd
�y)Nc��eZdZUeed<d�Zy)�)TestInit.test_overwriting_init.<locals>.Cr8c��d|z|_yrnr~�r-r8s  rr�z2TestInit.test_overwriting_init.<locals>.C.__init__8	�
���Q���rN�rrrr:r;r�rrrr%r5	����F�
rr%r�rTr�c��eZdZUeed<d�Zy)rr8c��d|z|_yrnr~rs  rr�z2TestInit.test_overwriting_init.<locals>.C.__init__?	rrNrrrrr%z)TestInit.test_overwriting_init.<locals>.C<	rrr��Fc��eZdZUeed<d�Zy)rr8c��d|z|_yrnr~rs  rr�z2TestInit.test_overwriting_init.<locals>.C.__init__F	rrNrrrrr%z)TestInit.test_overwriting_init.<locals>.CC	rrr�r�r>r�s  r�test_overwriting_initzTestInit.test_overwriting_init1	s���
�	�	�
�	�	
����1�����#�	��	�	�	�
�	�	
����1�����#�	��	�	�	�
�	�	
����1�����$rc��Gd�dt�}tGd�d|��}|j|d�jd�tGd�d|��}|j|d�jd�y)	Nc��eZdZUeed<y)�.TestInit.test_inherit_from_protocol.<locals>.Pr%Nr9rrrr�r&N	r4rr�c��eZdZUeed<y)�.TestInit.test_inherit_from_protocol.<locals>.Cr%Nr9rrrr%r(Q	r<rr%r�c��eZdZd�Zy)�.TestInit.test_inherit_from_protocol.<locals>.Dc��|dz|_yrnr�)r-r%s  rr�z7TestInit.test_inherit_from_protocol.<locals>.D.__init__Y	rrNr�rrrrbr*W	s��
rrbr�)rr(r)r%)r-r�r%rbs    r�test_inherit_from_protocolz#TestInit.test_inherit_from_protocolJ	sv��	��	�
�	��	�
�	�	
����1�����#�	�	��	�
�	�	
����1�����$rN)rrrrrr#r,rrrrr
	s��#�2#�%�2%rrc��eZdZd�Zd�Zd�Zy)�TestReprc���tGd�d��}tGd�d|��}|d�}|jt|�d�tGd�d|��}|jt|��d	�tGd
�d��}|jt|jd��d�|jt|j	��d
�y)Nc��eZdZUeed<y)�TestRepr.test_repr.<locals>.Br8Nr9rrrr�r1a	r<rr�c��eZdZUdZeed<y)�TestRepr.test_repr.<locals>.Cr�r�Nr(rrrr%r3e	rrr%r�z(TestRepr.test_repr.<locals>.C(x=4, y=10)c��eZdZUdZeed<y)�TestRepr.test_repr.<locals>.Dr�r8Nr�rrrrbr5l	rrrbz)TestRepr.test_repr.<locals>.D(x=20, y=10)c�H�eZdZeGd�d��ZeGd�d��Zy)r3c��eZdZUeed<y)�TestRepr.test_repr.<locals>.C.Dr3Nr9rrrrbr8s	r�rrbc��eZdZy)�TestRepr.test_repr.<locals>.C.ENrrrrr�r:v	s��rr�N)rrrr(rbr�rrrr%zTestRepr.test_repr.<locals>.Cq	s0��
�
�
��
�
�
�
��
rrz$TestRepr.test_repr.<locals>.C.D(i=0)z!TestRepr.test_repr.<locals>.C.E())r(r)rNrbr�)r-r�r%r.rbs     r�	test_reprzTestRepr.test_repr`	s���	�	�	�
�	�
�	��	�
�	�
�a�D������a��"L�M�	�	��	�
�	�����a�c��$O�P�	�	�	�
�	�	
����a�c�c�!�f��'M�N�����a�c�c�e��&I�Jrc��td��Gd�d��}|jt�d�t|d���td��Gd�d��}|j	t|d��d�y)	NFr�c��eZdZUeed<y)� TestRepr.test_no_repr.<locals>.Cr8Nr9rrrr%r>~	r<rr%z+.TestRepr.test_no_repr.<locals>.C object atr�c��eZdZUeed<d�Zy)r>r8c��y)N�C-classrr�s rr�z)TestRepr.test_no_repr.<locals>.C.__repr__�	s�� rN�rrrr:r;r�rrrr%z TestRepr.test_no_repr.<locals>.C�	s���F�
!rrA)r(rYrrNr)r�s  r�test_no_reprzTestRepr.test_no_repr|	sw��	��	�	�	�
�	��
�
��
�"M�N��1�Q�4�j�	"�
��	�	!�	!�
�	!�	
����a��d��Y�/rc�T�tGd�d��}|jt|d��d�td��Gd�d��}|jt|d��d�td��Gd	�d��}|jt|d��d�y)
Nc��eZdZUeed<d�Zy)�)TestRepr.test_overwriting_repr.<locals>.Cr8c��y�Nr8rr�s rr�z2TestRepr.test_overwriting_repr.<locals>.C.__repr__�	r�rNrBrrrr%rF�	r�rr%rr8Tr�c��eZdZUeed<d�Zy)rFr8c��yrHrr�s rr�z2TestRepr.test_overwriting_repr.<locals>.C.__repr__�	r�rNrBrrrr%z)TestRepr.test_overwriting_repr.<locals>.C�	r�rFc��eZdZUeed<d�Zy)rFr8c��yrHrr�s rr�z2TestRepr.test_overwriting_repr.<locals>.C.__repr__�	r�rNrBrrrr%z)TestRepr.test_overwriting_repr.<locals>.C�	r�rr�r�s  r�test_overwriting_reprzTestRepr.test_overwriting_repr�	s���
�	�	�
�	�	
����a��d��S�)�	��	�	�	�
�	�	
����a��d��S�)�	��	�	�	�
�	�	
����a��d��S�)rN)rrrr;rCrMrrrr.r._	s��K�80� *rr.c��eZdZd�Zd�Zy)�TestEqc��td��Gd�d��}|j|d�|d��|d�}|j||�td��Gd�d��}|j|d�d�y)	NF�rsc��eZdZUeed<y)�TestEq.test_no_eq.<locals>.Cr8Nr9rrrr%rS�	r<rr%rr�c��eZdZUeed<d�Zy)rSr8c��|dk(Srirr�s  rr�z#TestEq.test_no_eq.<locals>.C.__eq__�	s����{�"rNr�rrrr%zTestEq.test_no_eq.<locals>.C�	s���F�
#rr�)r(r�r)r�s   r�
test_no_eqzTestEq.test_no_eq�	s���	�e�	�	�	�
�	����A�a�D�!�A�$�'�
�a�D������A��
�e�	�	#�	#�
�	#�	
����1��r�"rc��tGd�d��}|j|d�d�|j|d�d�td��Gd�d��}|j|d�d�|j|d�d�td	��Gd
�d��}|j|d�d�|j|d�d�y)Nc��eZdZUeed<d�Zy)�%TestEq.test_overwriting_eq.<locals>.Cr8c��|dk(Srrr�s  rr�z,TestEq.test_overwriting_eq.<locals>.C.__eq__�	�����z�!rNr�rrrr%rY�	����F�
"rr%rCr�TrQc��eZdZUeed<d�Zy)rYr8c��|dk(SrWrr�s  rr�z,TestEq.test_overwriting_eq.<locals>.C.__eq__�	r[rNr�rrrr%z%TestEq.test_overwriting_eq.<locals>.C�	r\rr�Fc��eZdZUeed<d�Zy)rYr8c��|dk(SrZrr�s  rr�z,TestEq.test_overwriting_eq.<locals>.C.__eq__�	r[rNr�rrrr%z%TestEq.test_overwriting_eq.<locals>.C�	r\rr�r�r�s  r�test_overwriting_eqzTestEq.test_overwriting_eq�	s���
�	"�	"�
�	"�	
����1��q�!����A�a�D�!�$�	�d�	�	"�	"�
�	"�	
����1��q�!����A�a�D�!�$�	�e�	�	"�	"�
�	"�	
����1��q�!����A�a�D�!�$rN)rrrrVrarrrrOrO�	s��#�"%rrOc��eZdZd�Zd�Zd�Zy)�TestOrderingc��ttGd�d���}|j|d�d�|j|d�d�|j	|d�d�|j|d�d�y)Nc��eZdZUeed<d�Zy)�5TestOrdering.test_functools_total_ordering.<locals>.Cr8c� �|j|k\Sr�r~r�s  rrzz<TestOrdering.test_functools_total_ordering.<locals>.C.__lt__�	s���v�v���&rN�rrrr:r;rzrrrr%rf�	s���F�
'rr%r���rC)rr(rDr4rEr5r�s  r�test_functools_total_orderingz*TestOrdering.test_functools_total_ordering�	sq��	�	�	'�	'�
�
�	'�	
����!��b�!����Q�q�T�2�&����1�Q�4��#�����!��a�(rc���td��Gd�d��}|jd|j�|jd|j�|jd|j�|jd|j�td��Gd	�d��}|jd|j�|jd|j�|jd|j�y)
NFrc��eZdZUeed<y)�%TestOrdering.test_no_order.<locals>.Cr8Nr9rrrr%rm�	r<rr%r{rzr}r|c��eZdZUeed<d�Zy)rmr8c��yr�rr�s  rrzz,TestOrdering.test_no_order.<locals>.C.__lt__�	r�rNrhrrrr%z%TestOrdering.test_no_order.<locals>.C�	r�rr�r�s  r�
test_no_orderzTestOrdering.test_no_order�	s���	��	�	�	�
 �	�	
����1�:�:�.�����1�:�:�.�����1�:�:�.�����1�:�:�.�
��	�	�	�
 �	�
	
����1�:�:�.�����1�:�:�.�����1�:�:�.rc�$�|jtd�5td��Gd�d��}ddd�|jtd�5td��Gd�d��}ddd�|jtd�5td��Gd	�d��}ddd�|jtd
�5td��Gd�d��}ddd�y#1swY��xYw#1swY��xYw#1swY�ZxYw#1swYyxYw)NzACannot overwrite attribute __lt__.*using functools.total_orderingTrc��eZdZUeed<d�Zy)�.TestOrdering.test_overwriting_order.<locals>.Cr8c��yr�rr�s rrzz5TestOrdering.test_overwriting_order.<locals>.C.__lt__
r�rNrhrrrr%rs
�����rr%zACannot overwrite attribute __le__.*using functools.total_orderingc��eZdZUeed<d�Zy)rsr8c��yr�rr�s rr{z5TestOrdering.test_overwriting_order.<locals>.C.__le__
r�rN)rrrr:r;r{rrrr%z.TestOrdering.test_overwriting_order.<locals>.C	
rurzACannot overwrite attribute __gt__.*using functools.total_orderingc��eZdZUeed<d�Zy)rsr8c��yr�rr�s rr|z5TestOrdering.test_overwriting_order.<locals>.C.__gt__
r�rN)rrrr:r;r|rrrr%z.TestOrdering.test_overwriting_order.<locals>.C
rurzACannot overwrite attribute __ge__.*using functools.total_orderingc��eZdZUeed<d�Zy)rsr8c��yr�rr�s rr}z5TestOrdering.test_overwriting_order.<locals>.C.__ge__
r�rN)rrrr:r;r}rrrr%z.TestOrdering.test_overwriting_order.<locals>.C
rurr>r�s  r�test_overwriting_orderz#TestOrdering.test_overwriting_order�	s5��
�
#�
#�I�%G�H�	��T�
"�
�
�#�
�		��
#�
#�I�%G�H�	��T�
"�
�
�#�
�		��
#�
#�I�%G�H�	��T�
"�
�
�#�
�		��
#�
#�I�%G�H�	��T�
"�
�
�#�
�		�	�7	�	��	�	��	�	��	�	�s/�C"�C.�C:�?D�"C+�.C7�:D�DN)rrrrjrpr|rrrrcrc�	s��)� /�,#rrcc�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�TestHashc��td��Gd�d��}|jt|dd��td��y)NTr�c�"�eZdZUeed<eed<y)�$TestHash.test_unsafe_hash.<locals>.Cr8r�Nr�rrrr%r�#
rJrr%rCr�)rCr��r(r)r�r�s  r�test_unsafe_hashzTestHash.test_unsafe_hash"
s@��	�t�	$�	�	�
%�	�	
����a��5�k�*�D��,<�=rc	���d�}�fd�}tgd�d�D]c\}\}}}}}|||||d|�|||||d|�||||�||�||�d|�||||�||�||�d|��ey)Nc��|�y|ryy)N)r�rr)r4s r�non_boolz*TestHash.test_hash_rules.<locals>.non_bool*
s���}����rc�����j||||��5|dk7r9|rt|||��Gd�d��}nt|||��Gd�d��}|dk(r;�jdj��j	|jd�n�|d	k(r|s��jdj�n�|d
k(r;�jdj��j
|jd�nN|dk(r?|sJ��jtd�5t|||��Gd�d��}ddd�n
Jd
|����ddd�y#1swY�xYw#1swYyxYw)N)�caser�rsrhrp)r�rsrhc��eZdZd�Zy)�1TestHash.test_hash_rules.<locals>.test.<locals>.Cc��yr�rr�s rr�z:TestHash.test_hash_rules.<locals>.test.<locals>.C.__hash__9
���'(rNr�rrrr%r�7
���)rr%c��eZdZy)r�Nrrrrr%z1TestHash.test_hash_rules.<locals>.test.<locals>.C<
rwrr7r�r��noner�c��eZdZd�Zy)r�c��yr�rr�s rr�z:TestHash.test_hash_rules.<locals>.test.<locals>.C.__hash__W
r�rNr�rrrr%z1TestHash.test_hash_rules.<locals>.test.<locals>.CU
r�rr~)	r2r(rYr�assertIsNotNonerr�rHr�)r�r�rsrh�	with_hashr�r%r-s       �rrIz&TestHash.test_hash_rules.<locals>.test2
sw������4�[�R�%+��-�(
?��[�(� �"�{�r�&�Q�)�)�R�)�#�{�r�&�Q�!�!�R�!��T�>��M�M�*�a�j�j�9��(�(����J�)?�@��r�\�$��(�(��Q�Z�Z�@��v�%��M�M�*�a�j�j�9��%�%�a�j�j��&<�=��{�*�%�%��/�/�	�;`�a�)�"�{�r�&�Q�)�)�R�)�)�)�?�O�F�:�">�>�Q(
?�(
?�B)�)��C(
?�(
?�s$�DE�E�5E�E	�E�E&))FFFr�r�)FFTr�r�)FTFr�r�)FTTr7r�)TFFr7rp)TFTr7rp)TTFr7rp)TTTr7rprCFT)r3)	r-r�rIr�r�rsrh�res_no_defined_hash�res_defined_hashs	`        r�test_hash_ruleszTestHash.test_hash_rules)
s����	�)	?�b[d�	e��	[�	g�V�D�V�;���0C�EU�
��{�B���7J�K���{�B���7G�H�

��x��,�h�r�l�H�V�<L�e�Uh�i���x��,�h�r�l�H�V�<L�d�Ue�f�#	grc�|�tGd�d��}|j|d�|d��|j|d�|d��td��Gd�d��}|j|d�|d��|jt|d��t|d���tdd�	�Gd
�d��}|j|d�|d��|j|d�|d��|jt|d��t|d���y)Nc��eZdZUeed<d�Zy)� TestHash.test_eq_only.<locals>.Cr3c�4�|j|jk(Sr�rr�s  rr�z'TestHash.test_eq_only.<locals>.C.__eq__�
����v�v����(�(rNr�rrrr%r�}
����F�
)rr%rCr�Tr�c��eZdZUeed<d�Zy)r�r3c�4�|j|jk(Sr�rr�s  rr�z'TestHash.test_eq_only.<locals>.C.__eq__�
r�rNr�rrrr%z TestHash.test_eq_only.<locals>.C�
r�rr�)r�rsc��eZdZUeed<d�Zy)r�r3c�V�|jdk(xr|j|jk(Srrr�s  rr�z'TestHash.test_eq_only.<locals>.C.__eq__�
s"���v�v��{�8�t�v�v����'8�8rNr�rrrr%z TestHash.test_eq_only.<locals>.C�
s���F�
9rr�)r(r)r�r�r�s  r�test_eq_onlyzTestHash.test_eq_onlyw
s��
�	)�	)�
�	)�	
����1��q��t�$����A�a�D�!�A�$�'�
�t�	$�	)�	)�
%�	)�	
����1��q��v�&�����a��d��T�!�C�&�\�2�
�t��	-�	9�	9�
.�	9�	
����1��q��t�$����A�a�D�!�A�$�'�����a��d��T�!�C�&�\�2rc��td��Gd�d��}|jt|��td��td��Gd�d��}|jt|��td��y)NTr�c��eZdZy��%TestHash.test_0_field_hash.<locals>.CNrrrrr%r��
r&rr%rr�c��eZdZyr�rrrrr%z%TestHash.test_0_field_hash.<locals>.C�
r&rr�r�s  r�test_0_field_hashzTestHash.test_0_field_hash�
sn��	�$�	�	�	�
 �	�����a�c��D��H�-�	�t�	$�	�	�
%�	�����a�c��D��H�-rc��td��Gd�d��}|jt|d��td��|jt|d��td��td�	�Gd
�d��}|jt|d��td��|jt|d��td��y)NTr�c��eZdZUeed<y��%TestHash.test_1_field_hash.<locals>.Cr8Nr9rrrr%r��
r<rr%r�)r�r=�r=r�c��eZdZUeed<yr�r9rrrr%z%TestHash.test_1_field_hash.<locals>.C�
r<rr�r�s  r�test_1_field_hashzTestHash.test_1_field_hash�
s���	�$�	�	�	�
 �	�����a��d��T�$�Z�0�����a��e��d�5�k�2�	�t�	$�	�	�
%�	�����a��d��T�$�Z�0�����a��e��d�5�k�2rc��Gd�d�}ddtdfdd|dfddtdfdd|dfddtdfdd|dfddtdfdd|dfddtdfdd|dfddtdfdd|dfddtdfdd|dfddtdfdd|dfddtdfdd|dffD�]]\}}}}|j||||�	�5|�|�tGd
�d|��}nU|�t|��Gd
�d|��}n8|�t|��Gd�d|��}nt||��Gd�d|��}|dk(r3|d�}|jtd�5t|�ddd�n�|dk(r"|j
t|d��d�nj|dk(r+|j|jtj�n:|dk(r+|j
t|d��td��n
Jd|����ddd���`y#1swY�xYw#1swY��xxYw)Nc��eZdZd�Zy)�(TestHash.test_hash_no_args.<locals>.Basec��yr�rr�s rr�z1TestHash.test_hash_no_args.<locals>.Base.__hash__�
r�rNr�rrrr�r��
s��
rr�r�Fr��baseTr�)rhrsr�rlc��eZdZUeed<y��%TestHash.test_hash_no_args.<locals>.Cr3Nr9rrrr%r��
����rr%rQc��eZdZUeed<yr�r9rrrr%z%TestHash.test_hash_no_args.<locals>.C�
r�rr�c��eZdZUeed<yr�r9rrrr%z%TestHash.test_hash_no_args.<locals>.C�
r�r)rhrsc��eZdZUeed<yr�r9rrrr%z%TestHash.test_hash_no_args.<locals>.C�
r�rr��unhashable typer�r=r�zunknown value for expected=)	r�r2r(rHr�r�r)r�r�)r-r�rhrsr�rlr%r�s        r�test_hash_no_argszTestHash.test_hash_no_args�
s���	�	��D�6�<�0�
�D�4�<�0�
�E�6�8�,�
�E�4�6�*�
�D�6�<�0�
�D�4�<�0�
�D�6�<�0�
�D�4�<�0�
�E�6�8�,�
�E�4�6�*�
�D�6�<�0�
�D�4�<�0�
�D�6�7�+�
�D�4�7�+�
�E�6�8�,�
�E�4�6�*�
�D�6�7�+�
�D�4�7�+�%6�<	M�+�F�B�4�8�*���V�����Q�'
M��>�b�j���D�����^��"�%��D��&���Z��f�-��D��.���f��4��D��5���|�+��"��A��/�/�	�;L�M� ��Q�� � ���'��$�$�T�!�B�%�[�#�6���)�
�M�M�!�*�*�f�o�o�>���(��$�$�T�!�B�%�[�$�u�+�>�M�$?��|�"L�L�O'
M�'
M�+<	M�V � ��-'
M�'
M�s&�)BG9�;G-�BG9�-G6�2G9�9H	N)	rrrr�r�r�r�r�r�rrrr~r~!
s&��>�Kg�\!3�F	.�3�HMrr~c�T�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zy
)�
TestFrozenc��td��Gd�d��}|d�}|j|jd�|jt�5d|_ddd�|j|jd�y#1swY�&xYw)NTr�c��eZdZUeed<y)�!TestFrozen.test_frozen.<locals>.Cr3Nr9rrrr%r��
r<rr%r�r�)r(r)r3r�rtr�s   r�test_frozenzTestFrozen.test_frozen�
s|��	�$�	�	�	�
 �	�
�b�E��������b�!�
�
�
�2�
3�	��A�C�	�������b�!�	�	�s�B�B	c�j�td��Gd�d��}|�}|jt|d��|jt�5d|_ddd�|jt|d��|jt�5|`ddd�y#1swY�ExYw#1swYyxYw)NTr�c��eZdZy)�'TestFrozen.test_frozen_empty.<locals>.CNrrrrr%r�
r&rr%r3r�)r(r�rwr�rtr3r�s   r�test_frozen_emptyzTestFrozen.test_frozen_empty	s���	�$�	�	�	�
 �	�
�C�������C��)�
�
�
�2�
3�	��A�C�	������C��)�
�
�
�2�
3�	���	�	�	�	��	�	�s�B�B)�B&�)B2c��td��Gd�d��}td��Gd�d|��}|dd�}|jt�5d	|_ddd�|jt�5d
|_ddd�|j|jd�|j|jd�y#1swY�gxYw#1swY�NxYw)NTr�c��eZdZUeed<y)�"TestFrozen.test_inherit.<locals>.Cr3Nr9rrrr%r�r<rr%c��eZdZUeed<y)�"TestFrozen.test_inherit.<locals>.Dr*Nr9rrrrbr�r<rrbrr�r�r)r(r�rtr3r*r)�r-r%rbr�s    r�test_inheritzTestFrozen.test_inherits���	�$�	�	�	�
 �	�
�$�	�	��	�
 �	�
�a��H��
�
�
�2�
3�	��A�C�	�
�
�
�2�
3�	��A�C�	�������a� �������b�!�	�	��	�	�s�C�7C�C	�Cc��td��Gd�d��}|jtd�5tGd�d|��}ddd�y#1swYyxYw)NTr�c��eZdZy)�>TestFrozen.test_inherit_nonfrozen_from_empty_frozen.<locals>.CNrrrrr%r�(r&rr%�5cannot inherit non-frozen dataclass from a frozen onec��eZdZUeed<y)�>TestFrozen.test_inherit_nonfrozen_from_empty_frozen.<locals>.Dr*Nr9rrrrbr�.r�rrbr�rds   r�(test_inherit_nonfrozen_from_empty_frozenz3TestFrozen.test_inherit_nonfrozen_from_empty_frozen'sb��	�$�	�	�	�
 �	��
#�
#�I�$[�]�	�
�
�A�
��
�	�	�	�s�A�Ac��tGd�d��}tGd�d|��}|d�}|j|jd�|j||�y)Nc��eZdZy)�7TestFrozen.test_inherit_nonfrozen_from_empty.<locals>.CNrrrrr%r�3r&rr%c��eZdZUeed<y)�7TestFrozen.test_inherit_nonfrozen_from_empty.<locals>.Dr*Nr9rrrrbr�7r<rrbr�)r(r)r*r�r�s    r�!test_inherit_nonfrozen_from_emptyz,TestFrozen.test_inherit_nonfrozen_from_empty2sc��	�	�	�
�	�
�	��	�
�	�
�a�D��������a� ����a��#rc	�0�dD]y}|j|��5td��Gd�d��}|rGd�d|�}n|}|jtd	�5tGd
�d|��}ddd�ddd��{y#1swY�xYw#1swY��xYw)N�TF��intermediate_classTr�c��eZdZUeed<y)�8TestFrozen.test_inherit_nonfrozen_from_frozen.<locals>.Cr3Nr9rrrr%r�D����Frr%c��eZdZy)�8TestFrozen.test_inherit_nonfrozen_from_frozen.<locals>.INrrrr�Ir�Irrr�r�c��eZdZy)�8TestFrozen.test_inherit_nonfrozen_from_frozen.<locals>.DNrrrrrbr�Oryrrb�r2r(rHr��r-r�r%r�rbs     r�"test_inherit_nonfrozen_from_frozenz-TestFrozen.test_inherit_nonfrozen_from_frozenAs���"/�	�����1C��D�
��$�'���(��&�$�A�$��A��+�+�I�,c�e����A�����
�
�	����
�
�s$�AB�B�-B�B	�B�B	c	�0�dD]y}|j|��5tGd�d��}|rGd�d|�}n|}|jtd�5td�	�Gd
�d|��}ddd�ddd��{y#1swY�xYw#1swY��xYw)Nr�r�c��eZdZUeed<y)�8TestFrozen.test_inherit_frozen_from_nonfrozen.<locals>.Cr3Nr9rrrr%r�Vr�rr%c��eZdZy)�8TestFrozen.test_inherit_frozen_from_nonfrozen.<locals>.INrrrrr�r�[rrr�z5cannot inherit frozen dataclass from a non-frozen oneTr�c��eZdZy)�8TestFrozen.test_inherit_frozen_from_nonfrozen.<locals>.DNrrrrrbr�aryrrbr�r�s     r�"test_inherit_frozen_from_nonfrozenz-TestFrozen.test_inherit_frozen_from_nonfrozenSs���"/�	�����1C��D�
������&�$�A�$��A��+�+�I�,c�e���d�+��A��,���
�
�	����
�
�s#�:B�B�-B�B	�B�B	c�:�dD]~}|j|��5Gd�d�}|rGd�d|�}n|}td��Gd	�d
|��}ddd�d�}|jt�5d|_ddd���y#1swY�9xYw#1swY��xYw)
Nr�r�c��eZdZy)�4TestFrozen.test_inherit_from_normal_class.<locals>.CNrrrrr%r�hrlrr%c��eZdZy)�4TestFrozen.test_inherit_from_normal_class.<locals>.INrrrrr�r�lrrr�Tr�c��eZdZUeed<y)�4TestFrozen.test_inherit_from_normal_class.<locals>.Dr3Nr9rrrrbr�pr�rrbr�r�)r2r(r�rtr3)r-r�r%r�rbr�s      r�test_inherit_from_normal_classz)TestFrozen.test_inherit_from_normal_classes���"/�	�����1C��D�
���&�$�A�$��A��$�'����(��
��"��A��"�"�#6�7�
����
�
�	�
�
��
�
�s�5B�2B�B	�B	c�<�td��Gd�d��}Gd�d|�}|d�}|j|jd�|j|jd�d|_|jt�5d	|_ddd�|jt�5d	|_ddd�|j|jd�|j|jd�|j|jd�|jt�5|`ddd�|j|jd�|jt�5|`ddd�|j|jd�|`|jt|d
��|jt�5}|`ddd�|jjt�y#1swY��YxYw#1swY��AxYw#1swY��xYw#1swY��xYw#1swY�\xYw)NTr�c�&�eZdZUeed<dZeed<y)�4TestFrozen.test_non_frozen_normal_derived.<locals>.Dr8r�r�Nr�rrrrbr�{s���F��A�s�Krrbc��eZdZy)�4TestFrozen.test_non_frozen_normal_derived.<locals>.SNrrrrrwr��r_rrwr�r�r��cached)r(r)r8r�r�r�rtr�rwr9�assertNotIsInstancerp�r-rbrwr��cms     r�test_non_frozen_normal_derivedz)TestFrozen.test_non_frozen_normal_derivedxs���
�$�	�	�	�
 �	�	��	�
�a�D��������a� �������b�!�����
�
�2�
3�	��A�C�	�
�
�
�2�
3�	��A�C�	�������a� �������b�!�������4�(�
�
�
�2�
3�	���	�������a� �
�
�
�2�
3�	���	�������b�!�
�H������H�-�.�
�
�
�~�
.�	�"���	�� � ����/B�C�%	�	��	�	��	�	��	�	��
	�	�s<�G �&G-�G:�H�4H� G*�-G7�:H�H�Hc��td��Gd�d��}Gd�d|�}|�}|jt|d��d|_|j	|jd�|`|jt|d��|jt�5}|`ddd�|jjt�y#1swY�*xYw)	NTr�c��eZdZy)�FTestFrozen.test_non_frozen_normal_derived_from_empty_frozen.<locals>.DNrrrrrbr�r&rrbc��eZdZy)�FTestFrozen.test_non_frozen_normal_derived_from_empty_frozen.<locals>.SNrrrrrwr�r_rrwr8r�)
r(r�rwr8r)r�r9rrprtrs     r�0test_non_frozen_normal_derived_from_empty_frozenz;TestFrozen.test_non_frozen_normal_derived_from_empty_frozen�s���	�$�	�	�	�
 �	�	��	�
�C�������C��)����������a� �
�C������C��)�
�
�
�~�
.�	�"���	�� � ����/B�C�	�	�s�C�Cc��|jtd�5td��Gd�d��}ddd�|jtd�5td��Gd�d��}ddd�td��Gd	�d��}|j|d
�jd�y#1swY�}xYw#1swY�QxYw)Nz&Cannot overwrite attribute __setattr__Tr�c��eZdZUeed<d�Zy)�-TestFrozen.test_overwriting_frozen.<locals>.Cr8c��yr�rr�s rr7z9TestFrozen.test_overwriting_frozen.<locals>.C.__setattr__�r�rN�rrrr:r;r7rrrr%r�rurr%z&Cannot overwrite attribute __delattr__c��eZdZUeed<d�Zy)rr8c��yr�rr�s rr�z9TestFrozen.test_overwriting_frozen.<locals>.C.__delattr__�r�rN)rrrr:r;r�rrrr%z-TestFrozen.test_overwriting_frozen.<locals>.C�rurFc��eZdZUeed<d�Zy)rr8c�(�|dz|jd<y)NrMr8)r)r-rPr4s   rr7z9TestFrozen.test_overwriting_frozen.<locals>.C.__setattr__�s��%*�Q�Y��
�
�c�"rNrrrrr%z-TestFrozen.test_overwriting_frozen.<locals>.C�s���F�
/rr�r�)rHr�r(r)r8r�s  r�test_overwriting_frozenz"TestFrozen.test_overwriting_frozen�s���
�
#�
#�I�$L�N�	�
�d�
#�
�
�$�
�	��
#�
#�I�$L�N�	�
�d�
#�
�
�$�
�	�
�%�	 �	/�	/�
!�	/�	
����2����"�%�+	�	��	�	�s�B-�B9�-B6�9Cc���td��Gd�d��}t|d��|jtd�5t|i��ddd�y#1swYyxYw)NTr�c��eZdZUeed<y)�&TestFrozen.test_frozen_hash.<locals>.Cr8N)rrrrr;rrrr%r�r<rr%r�r�)r(r�rHr�r�s  r�test_frozen_hashzTestFrozen.test_frozen_hash�s^��	�$�	�	�	�
 �	�
	
�Q�q�T�
��
#�
#�I�/@�
A�	���2��K�	�	�	�s�A�A%N)rrrr�r�r�r�r�r�r�r�rr	rrrrrr�r��
sA��	"��"�"	�$��$�$�&#D�JD�&&�2rr�c�h�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	e
dd�	�Gd
�d��Ze
d��Gd
�d��Zd�Z
e
dd�	�Gd�d��Ze
dd�	�Gd�d��Ze
dd�	�Gd�d��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd �Zd!�Zy")#�	TestSlotsc��tGd�d��}|jtd�5|�ddd�|d�}|j|jd�d|_|j|jd�|jt
d�5d|_ddd�y#1swY�wxYw#1swYyxYw)Nc��eZdZUdZeed<y)� TestSlots.test_simple.<locals>.Cr~r8N�rrr�	__slots__rr;rrrr%r�����I��Frr%r�r�r�z'C' object has no attribute 'y')r(rHr�r)r8r9r�r�s   r�test_simplezTestSlots.test_simple�s���	�	�	�
�	��
#�
#�I�$_�a�	�
�C�	�

�b�E��������b�!����������a� ��
#�
#�N�4U�
V�	��A�C�	�	�	�	��	�	�s�B(�B4�(B1�4B=c���tGd�d��}tGd�d|��}|dd�}|j|j|jfd�d|_y)	Nc��eZdZUdZeed<y)�0TestSlots.test_derived_added_field.<locals>.Baser~r8Nrrrrr�r#�rrr�c�"�eZdZUeed<eed<y)�3TestSlots.test_derived_added_field.<locals>.Derivedr8r�Nr9rrr�Derivedr%�rJrr&rCrMrr�)r(r)r8r�r�)r-r�r&r�s    r�test_derived_added_fieldz"TestSlots.test_derived_added_field�sf��	�	�	�
�	�
�	�d�	�
�	�
�A�q�M�����!�#�#�q�s�s��V�,���rc�h�td��Gd�d��}|dd�}|j|j|jfd�d|_d	|_|j|j|jfd
�|j	t
d�5d|_ddd�y#1swYyxYw)
NT�rgc�"�eZdZUeed<eed<y)�)TestSlots.test_generated_slots.<locals>.Cr8r�Nr9rrrr%r+rJrr%rCrMrr�r�r�z'C' object has no attribute 'z'r�)r(r)r8r�rHr9r�r�s   r�test_generated_slotszTestSlots.test_generated_slotss���	��	�	�	�
�	�
�a��G�����!�#�#�q�s�s��V�,����������!�#�#�q�s�s��V�,�
�
#�
#�N�4U�
V�	��A�C�	�	�	�s�B(�(B1c��|jtd�5td��Gd�d��}ddd�y#1swYyxYw)Nz^C already specifies __slots__$Tr)c��eZdZUdZeed<y)�5TestSlots.test_add_slots_when_slots_exists.<locals>.Cr~r8N)rrrrr:r;rrrr%r/s��"�	��rr%r>r�s  r� test_add_slots_when_slots_existsz*TestSlots.test_add_slots_when_slots_existssD��
�
#�
#�I�/P�
Q�	�
�T�
"�
�
�#�
�	�	�	��	�:�Ac��Gd�d�}Gd�d|�}Gd�d|�}Gd�d|�}td	�
�Gd�d|��}|j|jd
�td	�
�Gd�d|��}|j|jd�tGd�d|��}|jd|j�y)Nc��eZdZdhZy)�2TestSlots.test_generated_slots_value.<locals>.Rootr8N�rrrrrrr�Rootr4�	����Irr6c��eZdZddd�Zy)�3TestSlots.test_generated_slots_value.<locals>.Root2z...r�)r+r*Nr5rrr�Root2r9s��#�"�-�Irr:c��eZdZdgZy)�3TestSlots.test_generated_slots_value.<locals>.Root3�hNr5rrr�Root3r< r7rr>c��eZdZdZy)�3TestSlots.test_generated_slots_value.<locals>.Root4�aaNr5rrr�Root4r@#s���IrrBTr)c�,�eZdZUeed<eed<eed<y)�2TestSlots.test_generated_slots_value.<locals>.Baser�r*r=Nr�rrrr�rD&rrr�r�c�@�eZdZUeed<eed<eed<eed<eed<y)�5TestSlots.test_generated_slots_value.<locals>.DerivedrAr8r�r+r=N)rrrr,r;r�r:rrrr&rF.s���I��F��F��F��Frr&rc��eZdZUeed<y)�<TestSlots.test_generated_slots_value.<locals>.AnotherDerivedr�Nr9rrr�AnotherDerivedrH8r<rrIr)r(r)rrr)r-r6r:r>rBr�r&rIs        r�test_generated_slots_valuez$TestSlots.test_generated_slots_values���	�	�	.�D�	.�	�E�	�	�E�	�
��	�	�5�	�
�	�
	
�������1�	��	�	�d�	�
�	�	
����*�*�G�4�	�	�T�	�
�	�	
����n�&=�&=�>rc��Gd�d�}Gd�d|�}|jtd�5td��Gd�d	|��}ddd�y#1swYyxYw)
Nc��eZdZedg�Zy)�=TestSlots.test_cant_inherit_from_iterator_slots.<locals>.Rootr%N)rrrr�rrrrr6rM@s
���c�U��Irr6c��eZdZdZy)�>TestSlots.test_cant_inherit_from_iterator_slots.<locals>.Root2�rNr5rrrr:rOCs���Irr:z%^Slots of 'Root' cannot be determinedTr)c��eZdZUeed<y)�:TestSlots.test_cant_inherit_from_iterator_slots.<locals>.Cr8Nr9rrrr%rRJr�rr%r>)r-r6r:r%s    r�%test_cant_inherit_from_iterator_slotsz/TestSlots.test_cant_inherit_from_iterator_slots>sc��	$�	$�	 �D�	 ��
#�
#��3�
�	��T�
"�
�E�
�#�
�	�	�	�s�A�Ac���Gd�d�}t|d��}|j||�|jt|d��|j	t|d��y)Nc��eZdZUeed<y)�+TestSlots.test_returns_new_class.<locals>.Ar8Nr9rrrr�rVOr4rr�Tr)r)r(rr�rwrv�r-r�r�s   r�test_returns_new_classz TestSlots.test_returns_new_classNsR��	�	�
�a�t�$������A�������K�0�1������;�/�0rT)rhrgc�"�eZdZUeed<eed<y)�TestSlots.FrozenSlotsClassr�r[Nr�rrr�FrozenSlotsClassrZY���
��
�rr[r�c�"�eZdZUeed<eed<y)�!TestSlots.FrozenWithoutSlotsClassr�r[Nr�rrr�FrozenWithoutSlotsClassr^^r\rr_c�`�|j|jjd�ttj
dz�D]�}|j
|��5|jdd�}t	jt	j||���}|j||�|j||�|jdd�}t	jt	j||���}|j||�|j||�ddd���y#1swY��xYw)N)r�r[rC�r�r%��protocol)r)r[rr�r�r�r2r�r�rr_)r-r�rU�ps    r�test_frozen_picklezTestSlots.test_frozen_picklecs���	
����.�.�8�8�.�I��6�2�2�Q�6�7�
	)�E����E��*�	
)��+�+�C��3���L�L����c�E�!B�C��� � ��a�(�� � ��a�(��2�2�3��:���L�L����c�E�!B�C��� � ��a�(�� � ��a�(�	
)�	
)�
	)�	
)�	
)�s
�CD$�$D-	c�F�eZdZUeed<eed<edd��Zeed<d�Z	y)�"TestSlots.FrozenSlotsGetStateClassr�r[F�rEr��getstate_calledc�`�tj|dd�|j|jgS�NriT�r�r7r�r[r�s r�__getstate__z/TestSlots.FrozenSlotsGetStateClass.__getstate__z�(�����t�%6��=��H�H�d�h�h�'�'rN)
rrrr�r;r:rGrir�rmrrr�FrozenSlotsGetStateClassrgss"��
��
�� %�e�U� C���C�	(rroc�F�eZdZUeed<eed<edd��Zeed<d�Z	y)�"TestSlots.FrozenSlotsSetStateClassr�r[Frh�setstate_calledc��tj|dd�tj|d|d�tj|d|d�y�NrrTr�rr[rC�r�r7�r-�states  r�__setstate__z/TestSlots.FrozenSlotsSetStateClass.__setstate__��A�����t�%6��=����t�U�E�!�H�5����t�U�E�!�H�5rN)
rrrr�r;r:rGrrr�rxrrr�FrozenSlotsSetStateClassrq~s"��
��
�� %�e�U� C���C�	6rrzc�j�eZdZUeed<eed<edd��Zeed<edd��Z	eed<d�Z
d�Zy	)
�"TestSlots.FrozenSlotsAllStateClassr�r[Frhrirrc�`�tj|dd�|j|jgSrkrlr�s rrmz/TestSlots.FrozenSlotsAllStateClass.__getstate__�rnrc��tj|dd�tj|d|d�tj|d|d�yrtrurvs  rrxz/TestSlots.FrozenSlotsAllStateClass.__setstate__�ryrN)rrrr�r;r:rGrir�rrrmrxrrr�FrozenSlotsAllStateClassr|�s8��
��
�� %�e�U� C���C� %�e�U� C���C�	(�	6rrc�h�ttjdz�D]�}|j|��5|j	dd�}tj
||��}|j
|j�|j|tj|��ddd���ttjdz�D]�}|j|��5|jdd�}tjtj
||���}|j
|j�|j||�ddd���ttjdz�D]�}|j|��5|jdd�}tj
||��}|j
|j�tj|�}|j
|j�|j||�ddd���y#1swY���xYw#1swY��cxYw#1swY��xYw)NrCrar%rb)
r�r�r�r2ror�rvrir)r�rzrrr)r-r�rU�dumped�obj2s     r�%test_frozen_slots_pickle_custom_statez/TestSlots.test_frozen_slots_pickle_custom_state�s����6�2�2�Q�6�7�	<�E����E��*�
<��3�3�C��;�����c�E�:������ 3� 3�4�� � ��f�l�l�6�&:�;�
<�
<�	<��6�2�2�Q�6�7�	,�E����E��*�
,��3�3�C��;���|�|�F�L�L��u�$E�F������ 4� 4�5�� � ��d�+�
,�
,�	,��6�2�2�Q�6�7�		,�E����E��*�
,��3�3�C��;�����c�E�:������ 3� 3�4��|�|�F�+������ 4� 4�5�� � ��d�+�
,�
,�		,�
<�
<��
,�
,��
,�
,�s&�A*H�A*H�<BH(�H	�H%	�(H1	c��td��Gd�d��}|d�}|j|jd�|j|jd�y)NTr)c�6�eZdZUeed<edd��Zeed<y)�4TestSlots.test_slots_with_default_no_init.<locals>.Ar%rFr:N�rrrr�r;rGrrrrr�r��s���F��3�U�3�A�s�3rr�r%r�r(r)r%r�r-r�rUs   r�test_slots_with_default_no_initz)TestSlots.test_slots_with_default_no_init�sQ��	��	�	4�	4�
�	4���f���������$��������$rc��td��Gd�d��}|d�}|j|jd�|j|jd�y)NTr)c�8�eZdZUeed<ed�d��Zeed<y)�<TestSlots.test_slots_with_default_factory_no_init.<locals>.Ar%c��y)Nrrrrrr�zETestSlots.test_slots_with_default_factory_no_init.<locals>.A.<lambda>�r�rFrrNr�rrrr�r��s���F��:�E�B�A�s�Brr�r%rr�r�s   r�'test_slots_with_default_factory_no_initz1TestSlots.test_slots_with_default_factory_no_init�sT��	��	�	C�	C�
�	C���f���������$��������$rc�h�td��Gd�d��}|jd|j�|�}|jtd�5tj|�ddd�|jt�5|jddd�y#1swY�4xYw#1swYyxYw)NTr)c��eZdZy)�*TestSlots.test_slots_no_weakref.<locals>.ANrrrrr�r��s��
rr��__weakref__zcannot create weak reference)
r(rrrHr��weakref�refr�r9r�r`s   r�test_slots_no_weakrefzTestSlots.test_slots_no_weakref�s���	��	�	�	�
�	�	
�������4�
�C��
�
#�
#�I�$B�D�	��K�K��N�	��
�
�~�
.�	�
�M�M�	�	�	�	��	�	�s�B�
B(�B%�(B1c���tdd��Gd�d��}|jd|j�|d�}tj|�}|j|j|�y)NT�rg�weakref_slotc��eZdZUeed<y)�'TestSlots.test_slots_weakref.<locals>.Ar%Nr9rrrr�r��r<rr�r�rC)r(rYrr�r�r�r�)r-r�r%�a_refs    r�test_slots_weakrefzTestSlots.test_slots_weakref�s\��	��D�	1�	�	�
2�	�	
�
�
�m�Q�[�[�1�
�a�D�����A����
�
�a�m�m�U�+rc��Gd�d�}td��Gd�d|��}|jd|j�|jd|j�|d�}t	j
|�y)	Nc��eZdZdZy)�3TestSlots.test_slots_weakref_base_str.<locals>.Baser�Nr5rrrr�r��s��%�Irr�Tr)c��eZdZUeed<y)�0TestSlots.test_slots_weakref_base_str.<locals>.Ar%Nr9rrrr�r��r<rr�r�rC�r(rYrrr�r��r-r�r�r%s    r�test_slots_weakref_base_strz%TestSlots.test_slots_weakref_base_str�sh��	&�	&�
��	�	��	�
�	�	
�
�
�m�T�^�^�4��������4�
�a�D�����A�rc��Gd�d�}td��Gd�d|��}|jd|j�|jd|j�|d�}t	j
|�y)	Nc��eZdZdZy)�5TestSlots.test_slots_weakref_base_tuple.<locals>.Base�r�Nr5rrrr�r�����(�Irr�Tr)c��eZdZUeed<y)�2TestSlots.test_slots_weakref_base_tuple.<locals>.Ar%Nr9rrrr�r��r<rr�r�rCr�r�s    r�test_slots_weakref_base_tuplez'TestSlots.test_slots_weakref_base_tuple�sh��	)�	)�
��	�	��	�
�	�
	
�
�
�m�T�^�^�4��������4�
�a�D�����A�rc��|jtd�5td��Gd�d��}ddd�y#1swYyxYw)N�'weakref_slot is True but slots is FalseT�r�c��eZdZUeed<y)�3TestSlots.test_weakref_slot_without_slot.<locals>.Ar%Nr9rrrr�r�
r�rr�r>�r-r�s  r�test_weakref_slot_without_slotz(TestSlots.test_weakref_slot_without_slot
sG��
�
#�
#�I�$M�O�	�
�D�
)�
�
�*�
�	�	�	�r1c�"�tddtfgdd��}|jd|j�|d�}t	j
|�|j
td�5tddtfgd�	�}ddd�y#1swYyxYw)
Nr�r%Tr�r�rCr�r�r�)rr:rYrr�r�rHr�)r-r�r%r�s    r� test_weakref_slot_make_dataclassz*TestSlots.test_weakref_slot_make_dataclass
s����3�#�s��
�T��M���
�
�m�Q�[�[�1�
�a�D�����A���
#�
#�I�$M�O�	F��s�c�3�Z�M��E�A�	F�	F�	F�s�&B�Bc�P�tdd��Gd�d��}tdd��Gd�d|��}|jd|j�|jd|j�|d�}t	j
|�}|j
|j|�y)	NTr�c��eZdZUeed<y)�?TestSlots.test_weakref_slot_subclass_weakref_slot.<locals>.BaserGNr9rrrr�r�
r�rr�c��eZdZy)�<TestSlots.test_weakref_slot_subclass_weakref_slot.<locals>.ANrrrrr�r�
���rr�r�rC�r(rYrrr�r�r�r��r-r�r�r%r�s     r�'test_weakref_slot_subclass_weakref_slotz1TestSlots.test_weakref_slot_subclass_weakref_slot
s���	��D�	1�	�	�
2�	�
��D�	1�	��	�
2�	�
	
�
�
�m�T�^�^�4��������4�
�a�D�����A����
�
�a�m�m�U�+rc�N�tdd��Gd�d��}td��Gd�d|��}|jd|j�|jd|j�|d	�}t	j
|�}|j
|j|�y)
NTr�c��eZdZUeed<y)�BTestSlots.test_weakref_slot_subclass_no_weakref_slot.<locals>.BaserGNr9rrrr�r�*
r�rr�r)c��eZdZy)�?TestSlots.test_weakref_slot_subclass_no_weakref_slot.<locals>.ANrrrrr�r�.
r�rr�r�rCr�r�s     r�*test_weakref_slot_subclass_no_weakref_slotz4TestSlots.test_weakref_slot_subclass_no_weakref_slot)
s���	��D�	1�	�	�
2�	�
��	�	��	�
�	�
	
�
�
�m�T�^�^�4��������4�
�a�D�����A����
�
�a�m�m�U�+rc�0�Gd�d�}tdd��Gd�d|��}|jd|j�|jd|j�|d�}t	j
|�}|j
|j|�y)	Nc��eZdZdZy)�BTestSlots.test_weakref_slot_normal_base_weakref_slot.<locals>.Baser�Nr5rrrr�r�;
r�rr�Tr�c��eZdZUeed<y)�?TestSlots.test_weakref_slot_normal_base_weakref_slot.<locals>.ArGNr9rrrr�r�>
r�rr�r�rCr�r�s     r�*test_weakref_slot_normal_base_weakref_slotz4TestSlots.test_weakref_slot_normal_base_weakref_slot:
s~��	)�	)�
��D�	1�	��	�
2�	�
	
�
�
�m�T�^�^�4��������4�
�a�D�����A����
�
�a�m�m�U�+rN)rrrr r'r,r0rJrSrXr(r[r_rerorzrr�r�r�r�r�r�r�r�r�r�r�r�rrrrr�s���.�$� �$?�L� 1��d�$�'���(���d������)� �d�$�'�(�(�(�(��d�$�'�	6�	6�(�	6��d�$�'�6�6�(�6� ,�8	%�	%��	,���"�	F�,�$,�",rrc�H�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zy)�TestDescriptorsc�H��Gd�d��tG�fd�d��}|j|jjd�tG�fd�d��}|j|jjd�|j|�jd�y)Nc��eZdZd�Zd�Zy)�(TestDescriptors.test_set_name.<locals>.Dc��|dz|_yrH�rP�r-�ownerrPs   r�__set_name__z5TestDescriptors.test_set_name.<locals>.D.__set_name__Q
�
�� �3�J��	rc��|�y|S�NrCr�r-�instancer�s   r�__get__z0TestDescriptors.test_set_name.<locals>.D.__get__S
s���'���rN)rrrr�r�rrrrbr�P
s��
'�
rrbc�*��eZdZUW��Zeed<y)�(TestDescriptors.test_set_name.<locals>.Cr�N)rrrr�r:r;�rbs�rr%r�Z
s����3�A�s�Jrr%�cxc�:��eZdZUeW��d��Zeed<y)r�Fr:r�N�rrrrGr�r:r;r�s�rr%z(TestDescriptors.test_set_name.<locals>.Cb
�������5�1�A�s�1rrC�r(r)r�rPrds  @r�
test_set_namezTestDescriptors.test_set_nameL
s����	�	�
�	�	�
�	���������4�(�

�	2�	2�
�	2���������4�(���������"rc���Gd�d��tG�fd�d��}|j|jjd�y)Nc��eZdZd�Zy)�.TestDescriptors.test_non_descriptor.<locals>.Dc��|dz|_yrHr�r�s   rr�z;TestDescriptors.test_non_descriptor.<locals>.D.__set_name__m
r�rN)rrrr�rrrrbr�l
s��
'rrbc�:��eZdZUeW��d��Zeed<y)�.TestDescriptors.test_non_descriptor.<locals>.CFr:r�Nr�r�s�rr%r�p
r�rr%r�r�rds  @r�test_non_descriptorz#TestDescriptors.test_non_descriptorh
s>���	'�	'�
�	2�	2�
�	2���������4�(rc���Gd�d�}|��t��_tG�fd�d��}|j�jjd�y)Nc��eZdZy)�2TestDescriptors.test_lookup_on_instance.<locals>.DNrrrrrbr�w
r_rrbc�0��eZdZUeW�d��Zeed<y)�2TestDescriptors.test_lookup_on_instance.<locals>.CFr:r3NrPrSs�rr%r�
s������/�A�s�/rr%r�rr�r(r)r)r-rbr%r�s   @r�test_lookup_on_instancez'TestDescriptors.test_lookup_on_instanceu
sT���	�	�
�C������
�	0�	0�
�	0�	
������2�2�A�6rc���Gd�d��t��_tG�fd�d��}|j�jjd�y)Nc��eZdZy)�/TestDescriptors.test_lookup_on_class.<locals>.DNrrrrrbr��
r_rrbc�:��eZdZUeW��d��Zeed<y)�/TestDescriptors.test_lookup_on_class.<locals>.CFr:r3NrPr�s�rr%r��
r�rr%rCr�rds  @r�test_lookup_on_classz$TestDescriptors.test_lookup_on_class�
sK���	�	�����
�	2�	2�
�	2�	
������2�2�A�6rc����Gd�d��t��_tG�fd�d��}�jj�|d�}|j	�jj
d�y)Nc��eZdZy)�.TestDescriptors.test_init_calls_set.<locals>.DNrrrrrbr��
r_rrbc�,��eZdZUW��ZW�ed<y)�.TestDescriptors.test_init_calls_set.<locals>.Cr3N�rrrr3r;r�s�rr%r��
�����3�A�q�Jrr%r�rC)r�__set__r(�
reset_mockr)r�r-r%r�rbs   @r�test_init_calls_setz#TestDescriptors.test_init_calls_set�
sd���	�	��F��	�	�	�	�
�	�	
�	�	����
�a�D��������-�-�q�1rc�(��Gd�d��t��_t��_tG�fd�d��}|d�}�jj	�|j
}|j
�jjd�y)Nc��eZdZy)�7TestDescriptors.test_getting_field_calls_get.<locals>.DNrrrrrbr�
r_rrbc�,��eZdZUW��ZW�ed<y)�7TestDescriptors.test_getting_field_calls_get.<locals>.Cr3Nr�r�s�rr%r�
r�rr%r�rC)rrr�r(rr3r)r)r-r%r�r4rbs    @r�test_getting_field_calls_getz,TestDescriptors.test_getting_field_calls_get�
sx���	�	��F��	��F��	�	�	�	�
�	�
�a�D��	
�	�	��������������-�-�q�1rc���Gd�d��t��_tG�fd�d��}|d�}�jj�d|_|j�jjd�y)Nc��eZdZy)�7TestDescriptors.test_setting_field_calls_set.<locals>.DNrrrrrbr�
r_rrbc�,��eZdZUW��ZW�ed<y)�7TestDescriptors.test_setting_field_calls_set.<locals>.Cr3Nr�r�s�rr%r�
r�rr%r�r�rC)rrr(rr3r)rrs   @r�test_setting_field_calls_setz,TestDescriptors.test_setting_field_calls_set�
sm���	�	��F��	�	�	�	�
�	�
�a�D��	
�	�	�������������-�-�q�1rc�d��Gd�d��t��_tG�fd�d��}�jj�|d�}|j	�jj
d���|_d|_|j	�jj
d�y)Nc��eZdZy)�FTestDescriptors.test_setting_uninitialized_descriptor_field.<locals>.DNrrrrrbr�
r_rrbc���eZdZUW�ed<y)�FTestDescriptors.test_setting_uninitialized_descriptor_field.<locals>.Cr3Nrr�s�rr%r�
r�rr%r�r)rrr(rr)rr3rs   @r�+test_setting_uninitialized_descriptor_fieldz;TestDescriptors.test_setting_uninitialized_descriptor_field�
s����	�	��F��	�	�	�	�
�	�	
�	�	����
�a�D��������-�-�q�1��c������������-�-�q�1rc����Gd�d��tG�fd�d��}|�}|j|jd�|d�}|j|jd�y)Nc�4�eZdZdededefd�Zdededdfd�Zy)�-TestDescriptors.test_default_value.<locals>.Dr�r�rUc� �|�y|jSr��_xr�s   rr�z5TestDescriptors.test_default_value.<locals>.D.__get__�
s���#���{�{�"rr4Nc��||_yr�r�r-r�r4s   rrz5TestDescriptors.test_default_value.<locals>.D.__set__�
�	��#��r�rrrrr�r:r�rrrrrbr�
�6��
#��
#�F�
#�s�
#�
$��
$�C�
$�D�
$rrbc�,��eZdZUW��ZW�ed<y)�-TestDescriptors.test_default_value.<locals>.Cr3Nr�r�s�rr%r"�
r�rr%r�r�rrs   @r�test_default_valuez"TestDescriptors.test_default_value�
s`���	$�	$�
�	�	�
�	�
�C��������c�"�
�a�D��������a� rc���Gd�d��tG�fd�d��}|jtd�5|�}ddd�y#1swYyxYw)Nc�4�eZdZdededefd�Zdededdfd�Zy)�0TestDescriptors.test_no_default_value.<locals>.Dr�r�rUc�2�|�
t��|jSr�)r9rr�s   rr�z8TestDescriptors.test_no_default_value.<locals>.D.__get__�
s���#�(�*�*��{�{�"rr4Nc��||_yr�rrs   rrz8TestDescriptors.test_no_default_value.<locals>.D.__set__�
rrrrrrrbr&�
r rrbc�,��eZdZUW��ZW�ed<y)�0TestDescriptors.test_no_default_value.<locals>.Cr3Nr�r�s�rr%r*�
r�rr%z&missing 1 required positional argumentr�rs   @r�test_no_default_valuez%TestDescriptors.test_no_default_value�
sU���	$�	$�
�	�	�
�	��
#�
#�I�/W�
X�	���A�	�	�	�s�A�AN)
rrrr�r�r�r�rr	rrr#r+rrrr�r�K
s4��#�8)�7� 7�
2�2�$2�"2�*!�*rr�c�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�TestStringAnnotationsc����dD]U�|j���5tG�fd�d��}|�|jd|j�ddd��Wy#1swY�bxYw)N)z
ClassVar[int]zClassVar [int]z ClassVar [int]rz
 ClassVar ztyping.ClassVar[int]ztyping.ClassVar[str]z typing.ClassVar[str]ztyping .ClassVar[str]ztyping. ClassVar[str]ztyping.ClassVar [str]ztyping.ClassVar [ str]ztyping.ClassVar.[int]ztyping.ClassVar+��typestrc���eZdZUW�ed<y)�.TestStringAnnotations.test_classvar.<locals>.Cr8Nrr/s�rr%r2�����Jrr%r8)r2r(rr�r-r%r0s  @r�
test_classvarz#TestStringAnnotations.test_classvarsr����	2�G�$���g��.�

2��������� � ��a�j�j�1�

2�

2�%	2�$

2�

2�s�9A�A&	c����dD]T�|j���5tG�fd�d��}|j|d�jd�ddd��Vy#1swY�axYw)N)
�CVz
t.ClassVarzt.ClassVar[int]ztyping..ClassVar[int]�Classvarz
Classvar[int]ztyping.ClassVarx[int]ztypong.ClassVar[int]zdataclasses.ClassVar[int]ztypingxClassVar[str]r/c���eZdZUW�ed<y)�3TestStringAnnotations.test_isnt_classvar.<locals>.Cr8Nrr/s�rr%r:2r3rr%r��r2r(r)r8r4s  @r�test_isnt_classvarz(TestStringAnnotations.test_isnt_classvar%so���
�	.�G����g��.�
.������� � ��2����"�-�

.�
.�	.�
.�
.���8A�A%	c���dD]c�|j���5tG�fd�d��}|jtd�5|d�jddd�ddd��ey#1swY�xYw#1swY�|xYw)N)
zInitVar[int]zInitVar [int] InitVar [int]r�z	 InitVar r�zdataclasses.InitVar[str]z dataclasses.InitVar[str]zdataclasses .InitVar[str]zdataclasses. InitVar[str]zdataclasses.InitVar [str]zdataclasses.InitVar [ str]zdataclasses.InitVar.[int]zdataclasses.InitVar+r/c���eZdZUW�ed<y)�-TestStringAnnotations.test_initvar.<locals>.Cr8Nrr/s�rr%r@Or3rr%zobject has no attribute 'x'rC)r2r(rHr9r8r4s  @r�test_initvarz"TestStringAnnotations.test_initvar9s�����	�G�$���g��.�
�������+�+�N�,I�K���a�D�F�F��

�
�%	�0���

�
�s#�,A7�A+�A7�+A4�0A7�7B	c����dD]T�|j���5tG�fd�d��}|j|d�jd�ddd��Vy#1swY�axYw)N)�IVz
dc.InitVarzxdataclasses.xInitVarztyping.xInitVar[int]r/c���eZdZUW�ed<y)�2TestStringAnnotations.test_isnt_initvar.<locals>.Cr8Nrr/s�rr%rE_r3rr%r�r;r4s  @r�test_isnt_initvarz'TestStringAnnotations.test_isnt_initvarXso����	.�G�
���g��.�
.������� � ��2����"�-�

.�
.�	.�

.�
.�r=c
���ddlm}ddlm}ddlm}ddlm}||||fD�]/}|j|��5|jr|jd�}n|j�}|j|jd�|jdd	d
dd�}d
D]L}|j|��5|jtd|�d��5t||�ddd�ddd��N|jr9|jd|j�|j|j d�n|j#d|j�ddd���2y#1swY��xYw#1swY��xYw#1swY��VxYw)Nr)�dataclass_module_1)�dataclass_module_1_str)�dataclass_module_2)�dataclass_module_2_str)�mr�r�rCrMr�r�)�iv0�iv1�iv2�iv3)�
field_namezobject has no attribute 'r/�not_iv4)�test.test_dataclassesrHrIrJrKr2�
USING_STRINGSr7r)�cv0rCrHr9rrYrrRr)r-rHrIrJrKrLr�rQs        r�!test_classvar_module_level_importz7TestStringAnnotations.test_classvar_module_level_importfs\��<�@�<�@�$�&<�$�&<��!	<�A������"�
<��?�?����R��A�����A�� � �����+��D�D��A�q�!�Q�'��">�3�J������<�3�!�3�3�N�F_�`j�_k�kl�Dm�n�3�$�A�z�2�3�3�3�3��?�?��M�M�)�Q�Z�Z�8��$�$�Q�Y�Y��2��$�$�Y��
�
�;�=
<�
<�!	<�*3�3��3�3��#
<�
<�s=�A7E+�,E	�
E�E	�A+E+�E�E	�E(
�$E+�+E5	c��ddlm}|jt|j�d|j
i�|jt|jj�|j
td�d��y)Nr)�dataclass_textannor�)r�rU)rSrXr)rr)r%r�rX)r-rXs  r�test_text_annotationsz+TestStringAnnotations.test_text_annotations�sk��<�����-�1�1�2�
�&�*�*�+�	-�	
����-�1�1�:�:�;�&�*�*��D�z�
#�	$rN)	rrrr5r<rArFrVrYrrrr-r-s"��"2�H.�(�>.�'<�R	$rr-�ByMakeDataClassr8�ManualModuleMakeDataClass)�module�Wrong�WrongModuleMakeDataclass�customc�r�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zy)�TestMakeDataclassc	��tddtfdttd��fgdd�i��}|d	�}|j|j|j
fd
�|j|j
�d�y)Nr%r8r�r�r��add_onec� �|jdzSr�r~r�s rr�z/TestMakeDataclass.test_simple.<locals>.<lambda>�s��d�f�f�q�j�r�r�r�)r�r�r�)rr:rGr)r8r�rcr�s   rr zTestMakeDataclass.test_simple�sp���3� �#�J� �#�u�Q�'7�8�:�&/�1H�%I�
K��
�b�E�����!�#�#�q�s�s��W�-��������b�)rc	�z�i}tddtfdttd��fg|��}|j|i�y)Nr%r8r�r�r�re)rr:rGr))r-�nsr%s   r�test_no_mutate_namespacez*TestMakeDataclass.test_no_mutate_namespace�sC��
���3� �#�J� �#�u�Q�'7�8�:�%'�
)��	
����R� rc���Gd�d�}Gd�d�}tddtfg||f��}|d�}|j||�|j||�|j||�y)	Nc��eZdZy)�*TestMakeDataclass.test_base.<locals>.Base1Nrrrr�Base1rk�r_rrlc��eZdZy)�*TestMakeDataclass.test_base.<locals>.Base2Nrrrr�Base2rn�r_rror%r8�r�rM)rr:r��r-rlror%r�s     r�	test_basezTestMakeDataclass.test_base�sm��	�	�	�	��3� �#�J�<�"'���
1��
�a�D�����a��#����a��'����a��'rc��tGd�d��}Gd�d�}tddtfg||f��}|jtd�5|d	�}ddd�|d
d	�}|j||�|j||�|j||�|j
|j|jfd�y#1swY�qxYw)Nc��eZdZUeed<y)�4TestMakeDataclass.test_base_dataclass.<locals>.Base1r8Nr9rrrrlru�r<rrlc��eZdZy)�4TestMakeDataclass.test_base_dataclass.<locals>.Base2Nrrrrrorw�r_rror%r�rpzrequired positionalrMrCr)	r(rr:rHr�r�r)r8r�rqs     r�test_base_dataclassz%TestMakeDataclass.test_base_dataclass�s���	�	�	�
�	�	�	��3� �#�J�<�"'���
1���
#�
#�I�/D�
E�	��!��A�	�
�a��G�����a��#����a��'����a��'����!�#�#�q�s�s��V�,�	�	�s�	C�C
c���d�}tddtfdttfgd|i��}|dd�}|jt	|�dd	i�|jtt
|��d
�y)Nc�.�|xj|zc_yr�r~�r-r�s  r�	post_initz2TestMakeDataclass.test_init_var.<locals>.post_init�s���F�F�a�K�Frr%r8r�rcrerMr�rrC)rr:r�r)r�r*r+)r-r|r%r�s    rr�zTestMakeDataclass.test_init_var�st��	�
�3� �#�J� �'�#�,�/��'6�y�%A�	
��
�a��G������a��3��(�+�����V�A�Y���+rc
�|�tddtfdttdfdtttd��fg�}|d�}|j	t|�ddi�|j	t
t|��d�|j	|jd�|j	|jd�y)	Nr%r8r�r�r�r�r�rC)
rr:rrGr)r�r*r+r�r�r�s   rr�z TestMakeDataclass.test_class_var�s����3� �#�J� �(�3�-��4� �(�3�-��r�1B�C��
��

�a�D������a��3��(�+�����V�A�Y���+�������b�!�������b�!rc
�\�tddtfdttdfdtttd��fgd�	�}|j	d
t|��|j
dt|��|jtd�5tdgd�
�}ddd�y#1swYyxYw)Nr%r8r�r�r�r�r�Fr�r�r�zunexpected keyword argument)�xxinit)	rr:rrGrr�rYrHr�r�s  r�test_other_paramsz#TestMakeDataclass.test_other_params�s����3� �#�J� �(�3�-��4� �(�3�-��r�1B�C��!&�
'��	
����T�!�W�-��
�
�j�$�q�'�*��
#�
#�I�/L�
M�	-��s�!�&+�-�A�	-�	-�	-�s�
B"�"B+c�v�tdgd��}|ddd�}|jt|�dddd��|j|jdddd��tdddtfd	g�}|ddd�}|jt|�dddd��|j|jdtdd��y)
Nr��r8r�r�rCrMr�z
typing.Anyr8r�r�)rr)r�r;r:r�s   r�
test_no_typeszTestMakeDataclass.test_no_typess����7�O�4��
�a��A�J������a�����":�;�����*�*�,�2>�2>�-@�	A�
�7�S�3��*�c�$:�;��
�a��A�J������a�����":�;�����*�*�,�25�2>�-@�	Arc��|jtjt�|jtd�jt�|jtjd�tdg�}|j|jt�|j|�jt�y)NrCr_�Nested)r)rZrrr^r)r-r�s  r�test_module_attrz"TestMakeDataclass.test_module_attrs�������3�3�X�>������+�6�6��A����1�<�<�h�G���"�-������*�*�H�5������,�,�h�7rc��ttfD]�}ttjdz�D]�}|j|��5|j
tjtj||��|�|j
tjtj|d�|��|d��ddd�����y#1swY��xYw�NrCra)	rZr[r�r�r�r2r)r�r��r-�klassr�s   r�test_pickle_supportz%TestMakeDataclass.test_pickle_supports���%�'@�A�
	�E��v�6�6��:�;�	
���\�\��\�.���$�$����V�\�\�%��%?�@����$�$����V�\�\�%��(�E�%B�C��a�����	
�
	���s
�A?C
�
Cc	���ttfD]�}ttjdz�D]�}|j|��5|j
tj�5tj||�ddd�|j
tj�5tj|d�|�ddd�ddd�����y#1swY�ZxYw#1swY�"xYw#1swY��xYwr�)	�WrongNameMakeDataclassr^r�r�r�r2r��PickleErrorr�r�s   r�test_cannot_be_pickledz(TestMakeDataclass.test_cannot_be_pickled&s���,�.F�G�	6�E��v�6�6��:�;�
6���\�\��\�.�6��*�*�6�+=�+=�>�3����U�E�2�3��*�*�6�+=�+=�>�6����U�1�X�u�5�6�6�6�
6�	6�3�3��6�6��6�6�s<� C)�!C	�8'C)�C	�<C)�C
�C)�C&
�"C)�)C2c��dD]J}|j|��5|jtd�5tdd|g�ddd�ddd��Ltd�fD]J}|j|��5|jtd�5tdd|g�ddd�ddd��Ly#1swY�jxYw#1swY��xYw#1swY�,xYw#1swY�{xYw)N)r)rCrMr�r�)�	bad_fieldzInvalid field: r%r%c��|Sr�rr~s rr�zCTestMakeDataclass.test_invalid_type_specification.<locals>.<lambda>9s��1�rzhas no len\(\))r2rHr�rr,)r-r�s  r�test_invalid_type_specificationz1TestMakeDataclass.test_invalid_type_specification/s����	:�I����	��2�
:��+�+�I�7I�J�:�"�3��i�(8�9�:�
:�
:�	:� �$��	:�I����	��2�
:��+�+�I�7H�I�:�"�3��i�(8�9�:�
:�
:�	:�	:�:��
:�
:��:�:��
:�
:�sE�B3�B'�B3�.C�B?�C�'B0�,B3�3B<	�?C�C�C	c	���dD]K}|j|��5|jtd�5td|d|g�ddd�ddd��My#1swY�xYw#1swY�dxYw)N)r%�ab�rGzField name duplicatedr%r%�r2rHr�r�r-rGs  r�test_duplicate_field_namesz,TestMakeDataclass.test_duplicate_field_names?sp�� �	=�E����E��*�
=��+�+�I�7N�O�=�"�3���U�(;�<�=�
=�
=�	=�=�=��
=�
=�s!�A�A�A�A�A�A'	c��dD]�}|j|��5|jtd�5tdd|g�ddd�|jtd�5td|g�ddd�|jtd�5td|dg�ddd�ddd���y#1swY�mxYw#1swY�MxYw#1swY�,xYw#1swY��xYw)N)�for�async�await�asr�zmust not be keywordsr%r%r�r�s  r�test_keyword_field_namesz*TestMakeDataclass.test_keyword_field_namesEs���4�	6�E����E��*�
6��+�+�I�7M�N�6�"�3��e��5�6��+�+�I�7M�N�1�"�3���0�1��+�+�I�7M�N�6�"�3����5�6�
6�
6�	6�6�6��1�1��6�6��
6�
6��Q�C�B*�C�B6�*C�C�C�*B3�/C�6B?�;C�C�C�C	c��dD]�}|j|��5|jtd�5tdd|g�ddd�|jtd�5td|g�ddd�|jtd�5td|dg�ddd�ddd���y#1swY�mxYw#1swY�MxYw#1swY�,xYw#1swY��xYw)N)�()�x,yr�2@3r�zlittle johnny tablesr�zmust be valid identifiersr%r%r�r�s  r�test_non_identifier_field_namesz1TestMakeDataclass.test_non_identifier_field_namesOs���J�	6�E����E��*�
6��+�+�I�7R�S�6�"�3��e��5�6��+�+�I�7R�S�1�"�3���0�1��+�+�I�7R�S�6�"�3����5�6�
6�
6�	6�6�6��1�1��6�6��
6�
6�r�c� �tdgd��y)Nr%)�_�_a�a_a�a_)rr�s r�test_underscore_field_namesz-TestMakeDataclass.test_underscore_field_namesYs��	�s�4�5rc��dD]G}|j|��5t|ddg�}|j|j|�ddd��Iy#1swY�TxYw)N)r�r�rr�r�)�	classnamer%r)r2rr)r)r-r�r%s   r�test_funny_class_names_namesz.TestMakeDataclass.test_funny_class_names_names^s_��7�	8�I����	��2�
8�"�9�s�C�j�9��� � ����Y�7�
8�
8�	8�
8�
8�s�+A�A	N)rrrr rhrrrxr�r�r�r�r�r�r�r�r�r�r�r�r�rrrrara�sX��*�!�(�-�$,�
"�-�"
A�8��6�:� =�6�6�6�
8rrac�Z�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zy)�TestReplacec���td��Gd�d��}|dd�}t|d��}|j|jd�|j|jd�y)	NTr�c�"�eZdZUeed<eed<y)�TestReplace.test.<locals>.Cr8r�Nr9rrrr%r�hrJrr%rCrMr�r~)r(rWr)r8r��r-r%r�rs    rrIzTestReplace.testgs^��	�$�	�	�	�
 �	�
�a��G��
�Q�!�_��������q�!�������q�!rc�2�td��Gd�d��}|dd�}t|d��}|j|j|j|j
|jfd	�|j|j|j|j
|jfd
�|jtd�5t|ddd
��ddd�|jtd�5t|d��t|ddd
��ddd�|jtd�5d|_ddd�|jtd�5t|dd��}ddd�y#1swY��xYw#1swY�ixYw#1swY�OxYw#1swYyxYw)NTr�c�^�eZdZUeed<eed<edd��Zeed<edd��Zeed<y	)
�"TestReplace.test_frozen.<locals>.Cr8r�Fr�r�r�r�r�N)rrrr:r;rGr�r�rrrr%r�ss.���F��F���r�2�A�s�2���s�3�A�s�3rr%rCrMr�r~)rCrMr�r�)r�rMr�r��
init=Falser�r�)r8r�r�rzcannot assign to field 'x'z3__init__\(\) got an unexpected keyword argument 'a'r�)r8r%)r(rWr)r8r�r�r�rHrIrtr�r�s    rr�zTestReplace.test_frozenrsk��	�$�	�	4�	4�
 �	4�
�a��G��
�Q�!�_�����!�#�#�q�s�s�A�C�C����-��?����"�$�$����b�d�d�B�D�D�1�?�C��
#�
#�J��
=�	(��A��b�B�'�	(�
�
#�
#�J��
=�	(��A����A��b�B�'�	(�
�
#�
#�$7�9U�
V�	��B�D�	��
#�
#�I�0D�E�	'���b�A�&�B�	'�	'�	(�	(��	(�	(��
	�	��	'�	'�s0�E)�0E5�+F�F
�)E2�5E>�F
�
Fc��td��Gd�d��}|dd�}|jtd�5t|d�	�}ddd�y#1swYyxYw)
NTr�c�"�eZdZUeed<eed<y)�.TestReplace.test_invalid_field_name.<locals>.Cr8r�Nr9rrrr%r��rJrr%rCrMz3__init__\(\) got an unexpected keyword argument 'z'r�r�r(rHr�rWr�s    r�test_invalid_field_namez#TestReplace.test_invalid_field_name�s`��	�$�	�	�	�
 �	�
�a��G��
�
#�
#�I�0;�<�	!���a��B�	!�	!�	!�s�A�Ac��td��Gd�d��}|jtd�5t|d��ddd�|jtd�5tdd��ddd�y#1swY�6xYw#1swYyxYw)	NTr�c�"�eZdZUeed<eed<y)�*TestReplace.test_invalid_object.<locals>.Cr8r�Nr9rrrr%r��rJrr%r|r�r~rr�r�s  r�test_invalid_objectzTestReplace.test_invalid_object�s���	�$�	�	�	�
 �	��
#�
#�I�/C�
D�	��A��O�	��
#�
#�I�/C�
D�	��A��O�	�	�	�	��	�	�s�A3�A?�3A<�?Bc��tGd�d��}|d�}d|_t|d��}|j|j|jfd�|jtd�5t|d	d
��ddd�|jtd�5t|d
��ddd�y#1swY�6xYw#1swYyxYw)
Nc�6�eZdZUeed<edd��Zeed<y)�#TestReplace.test_no_init.<locals>.Cr8Fr�r�r�Nr�rrrr%r��s���F���r�2�A�s�2rr%rCr�r�r~)r�r�r�rM�r�r�)r(r�rWr)r8rHrIr�s    rrzTestReplace.test_no_init�s���	�	3�	3�
�	3�
�a�D������Q�!�_�����"�$�$�����w�/��
#�
#�J��
=�	"��A��b�!�	"��
#�
#�J��
=�	��A���	�	�	"�	"��	�	�s�.B2�B>�2B;�>Cc�X�tGd�d��}|d�}|d�}|j|j|j�|j|jd�|j	t
d�5t
|d��ddd�t
|d	�
�y#1swY�xYw)Nc�,�eZdZUeed<dZeeed<y)�$TestReplace.test_classvar.<locals>.Cr8r�r�N)rrrr:r;r�rrrrr%r��s���F�#�A�x��}�#rr%rCrMr�z3__init__\(\) got an unexpected keyword argument 'y'r�r�r�r~)r(r�r�r)rHr�rWr�s    rr5zTestReplace.test_classvar�s���	�	$�	$�
�	$�
�a�D��
�a�D���
�
�a�c�c�1�3�3��������d�#��
#�
#�I�0F�G�	��A���	�	��Q��		�	�s�<B � B)c�8�tGd�d��}|dd�}|j|jd�|jtd�5t|d��ddd�t|dd�	�}|j|jd
�y#1swY�4xYw)Nc�.�eZdZUeed<eeed<d�Zy)�0TestReplace.test_initvar_is_specified.<locals>.Cr8r�c�.�|xj|zc_yr�r~r{s  rrcz>TestReplace.test_initvar_is_specified.<locals>.C.__post_init__�rorNr�rrrr%r��s���F��s�|�O�
rr%rCr�z,InitVar 'y' must be specified with replace()r�r~r�r�r�)r(r)r8rHrIrWr�s   r�test_initvar_is_specifiedz%TestReplace.test_initvar_is_specified�s���	�	�	�
�	�
�a��H��������b�!�
�
#�
#�J�1?�@�	��A��O�	�
�A��a� ��������b�!�		�	�s�B�Bc��tGd�d��}|ddd��}|jt|�|d���|jt|d�	�|ddd
���|jt|dd��|ddd���y)Nc�F�eZdZUeed<dZeeed<dZeeed<d�Zy)�6TestReplace.test_initvar_with_default_value.<locals>.Cr8Nr�r=r�c�b�|�|xj|z
c_|�|xj|z
c_yyr�r~)r-r�r�s   rrczDTestReplace.test_initvar_with_default_value.<locals>.C.__post_init__�s+���=��F�F�a�K�F��=��F�F�a�K�F�!r)	rrrr:r;r�r�r�rcrrrr%r��s(���F�"�A�w�s�|�"� �A�w�s�|� �
 rr%rCr�r�r�r~r�r�r=)r�r�)r(r)rWr�s   r�test_initvar_with_default_valuez+TestReplace.test_initvar_with_default_value�s���	�		 �		 �
�		 �
��R�1���������Q��W�-������a��!�b�A��*<�=������a�1�-�q�2��a�/@�Arc�~�tGd�d��}|d�}||_|jt|�d�y)Nc��eZdZUded<y)�*TestReplace.test_recursive_repr.<locals>.Cr%r�Nrrrrr%r��r<rr%z1TestReplace.test_recursive_repr.<locals>.C(f=...)�r(r�r)rNr�s   r�test_recursive_reprzTestReplace.test_recursive_repr�s@��	�	�	�
�	�
�d�G���������a��"U�Vrc��tGd�d��}|dd�}||_||_|jt	|�d�y)Nc�"�eZdZUded<ded<y)�4TestReplace.test_recursive_repr_two_attrs.<locals>.Cr%r��gNrrrrr%r��rJrr%zBTestReplace.test_recursive_repr_two_attrs.<locals>.C(f=..., g=...))r(r�r�r)rNr�s   r�test_recursive_repr_two_attrsz)TestReplace.test_recursive_repr_two_attrs�sM��	�	�	�
�	�
�d�D�M������������a��#>�	?rc���tGd�d��}tGd�d��}|d�}|d�}||_||_|jt|�d�y)Nc��eZdZUded<y)�6TestReplace.test_recursive_repr_indirection.<locals>.Crbr�Nrrrrr%r�	r<rr%c��eZdZUded<y)�6TestReplace.test_recursive_repr_indirection.<locals>.Dr%r�Nrrrrrbr�
r<rrbzwTestReplace.test_recursive_repr_indirection.<locals>.C(f=TestReplace.test_recursive_repr_indirection.<locals>.D(f=...))r�)r-r%rbr�r�s     r�test_recursive_repr_indirectionz+TestReplace.test_recursive_repr_indirectionsm��	�	�	�
�	�
�	�	�
�	�
�d�G��
�d�G������������a��#8�	9rc��tGd�d��}tGd�d��}tGd�d��}|d�}|d�}|d�}||_||_||_|jt|�d�y)Nc��eZdZUded<y)�:TestReplace.test_recursive_repr_indirection_two.<locals>.Crbr�Nrrrrr%r�r<rr%c��eZdZUded<y)�:TestReplace.test_recursive_repr_indirection_two.<locals>.Dr�r�Nrrrrrbr�r<rrbc��eZdZUded<y)�:TestReplace.test_recursive_repr_indirection_two.<locals>.Er%r�Nrrrrr�r�"r<rr�z�TestReplace.test_recursive_repr_indirection_two.<locals>.C(f=TestReplace.test_recursive_repr_indirection_two.<locals>.D(f=TestReplace.test_recursive_repr_indirection_two.<locals>.E(f=...)))r�)r-r%rbr�r�r�rIs       r�#test_recursive_repr_indirection_twoz/TestReplace.test_recursive_repr_indirection_twos���	�	�	�
�	�
�	�	�
�	�
�	�	�
�	�
�d�G��
�d�G��
�d�G���������������a��#9�	:rc��tGd�d��}|dd�}||_|jt|�d�y)Nc�"�eZdZUded<eed<y)�5TestReplace.test_recursive_repr_misc_attrs.<locals>.Cr%r�r�NrJrrrr%r�2rJrr%rCzATestReplace.test_recursive_repr_misc_attrs.<locals>.C(f=..., g=1)r�r�s   r�test_recursive_repr_misc_attrsz*TestReplace.test_recursive_repr_misc_attrs1sF��	�	�	�
�	�
�d�A�J���������a��#<�	=rN)rrrrIr�r�r�rr5r�r�r�r�r�r�r�rrrr�r�fsF��	"�'�@	!�
��(�&"�"B�$W�
?�9�":�0	=rr�c��eZdZd�Zd�Zy)�TestAbstractc��Gd�dtj�}td��Gd�d|��}|jt	j
|��|j
|ddd	�|dd
d��y)Nc�T�eZdZejd��Zejd��Zy)�5TestAbstract.test_abc_implementation.<locals>.Orderedc��yr�rr�s  rrzz<TestAbstract.test_abc_implementation.<locals>.Ordered.__lt__M���rc��yr�rr�s  rr{z<TestAbstract.test_abc_implementation.<locals>.Ordered.__le__Qr�rN)rrr�abc�abstractmethodrzr{rrr�Orderedr�Ls4��
�
�
�
� �
��
�
�
� �
rr�Trc�,�eZdZUeed<ded<ded<y)�2TestAbstract.test_abc_implementation.<locals>.Dater�Monthrr:rNr9rrrrr�U����I��N��Jrri�r��r �)r��ABCr(r�rs�
isabstractrE)r-r�rs   r�test_abc_implementationz$TestAbstract.test_abc_implementationKsn��	�c�g�g�	�
��	�	�7�	�
�	�
	
����+�+�D�1�2����4��R��+�T�$�q��_�=rc���Gd�dtj�}tGd�d|��}|jt	j
|��d}|j
t||�y)Nc�0�eZdZejd��Zy)�)TestAbstract.test_maintain_abc.<locals>.Ac��yr�rr�s rr�z-TestAbstract.test_maintain_abc.<locals>.A.foo`r�rN)rrrr�r�r�rrrr�r_s��
�
�
�
� �
rr�c�,�eZdZUeed<ded<ded<y)�,TestAbstract.test_maintain_abc.<locals>.Daterr�rr:rNr9rrrrrdr�rrz>class Date without an implementation for abstract method 'foo')r�rr(rvrsrrHr�)r-r�rrJs    r�test_maintain_abczTestAbstract.test_maintain_abc^s]��	����	�

�	�1�	�
�	�
	
����*�*�4�0�1�N�����y�#�t�4rN)rrrrr	rrrr�r�Js��>�&5rr�c�*�eZdZd�Zd�Zd�Zd�Zd�Zy)�
TestMatchArgsc�n�tGd�d��}|j|d�jd�y)Nc��eZdZUeed<y)�(TestMatchArgs.test_match_args.<locals>.Cr%Nr9rrrr%rqr<rr%r=r��r(r)�__match_args__r�s  r�test_match_argszTestMatchArgs.test_match_argsps3��	�	�	�
�	�����2��-�-�v�6rc�x��d�tG�fd�d��}|j|d�j��y)Nrc� ��eZdZUeed<W�Zy)�1TestMatchArgs.test_explicit_match_args.<locals>.Cr%N�rrrr:r;r)�mas�rr%rxs
����F��Nrr%r=)r(r�r)r-r%rs  @r�test_explicit_match_argsz&TestMatchArgs.test_explicit_match_argsvs9���
��	�	 �	 �
�	 �	
�
�
�a��e�*�*�B�/rc�r�tddd��Gd�d��}|j|jd�y)NF)rNrsrMc�,�eZdZUeed<eed<eed<y)�'TestMatchArgs.test_bpo_43764.<locals>.Xr%rr�Nr9rrrr�rrrr��r%rr�r)r-r�s  r�test_bpo_43764zTestMatchArgs.test_bpo_43764~s:��	��%�e�	4�	�	�
5�	�	
����)�)�?�;rc���td��Gd�d��}|jd|j�td��Gd�d��}|j|jd�td��Gd	�d
|��}|j|jd�tGd�d��}td��Gd
�d|��}|j|jd�y)NF��
match_argsc��eZdZUeed<y)�1TestMatchArgs.test_match_args_argument.<locals>.Xr%Nr9rrrr�r!�r<rr�rc��eZdZUeed<dZy)�1TestMatchArgs.test_match_args_argument.<locals>.Yr%rPNrrrrr�r#�s���F�#�Nrr�rPc��eZdZUeed<y)�1TestMatchArgs.test_match_args_argument.<locals>.Zr�Nr9rrr�Zr%�r<rr&c�"�eZdZUeed<eed<y)�1TestMatchArgs.test_match_args_argument.<locals>.Ar%r�Nr9rrrr�r(�rJrr�c��eZdZUeed<y)�1TestMatchArgs.test_match_args_argument.<locals>.BrNr9rrrr�r*�r<rr�)r%r�)r(rrr)r)r-r�r�r&r�r�s      r�test_match_args_argumentz&TestMatchArgs.test_match_args_argument�s���	�e�	$�	�	�
%�	����)�1�:�:�6�	�e�	$�	$�	$�
%�	$�	
����)�)�6�2�	�e�	$�	��	�
%�	�����)�)�6�2�
�	�	�
�	�
�e�	$�	��	�
%�	�����)�)�:�6rc���tddtfdtfg�}|j|jd�tddtfdtfgd��}|j|jd�tddtfdtfgd��}|j	d|j
�tddtfdtfgd	d
i��}|j|jd
�y)Nr%r8r�r�TrF�__match__args__rrre)rr:r)rrrr�s  r�test_make_dataclassesz#TestMatchArgs.test_make_dataclasses�s����3�#�s��c�3�Z� 8�9������)�)�:�6��3�#�s��c�3�Z� 8�T�J������)�)�:�6��3�#�s��c�3�Z� 8�U�K�����*�A�J�J�7��3�#�s��c�3�Z� 8�EU�W]�D^�_������)�)�6�2rN)rrrrrrr+r.rrrrros��7�0�<�7�83rrc�B�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zy
)�TestKeywordArgsc��d}|jt|�5tGd�d��}ddd�|jt|�5tGd�d��}ddd�|jt|�5td��Gd�d��}ddd�y#1swY�txYw#1swY�NxYw#1swYyxYw)Nz+field a is a ClassVar but specifies kw_onlyc�0�eZdZUed��Zeeed<y)�1TestKeywordArgs.test_no_classvar_kwarg.<locals>.AT��kw_onlyr%N�rrrrGr%rr:r;rrrr�r3�s��#(��#6��8�C�=�6rr�c�0�eZdZUed��Zeeed<y�r3Fr4r%Nr6rrrr�z1TestKeywordArgs.test_no_classvar_kwarg.<locals>.A����#(��#7��8�C�=�7rTr4c�0�eZdZUed��Zeeed<yr8r6rrrr�z1TestKeywordArgs.test_no_classvar_kwarg.<locals>.A�r9rr>)r-rJr�s   r�test_no_classvar_kwargz&TestKeywordArgs.test_no_classvar_kwarg�s���;��
�
#�
#�I�s�
3�	7�
�
7�
7��
7�	7�
�
#�
#�I�s�
3�	8�
�
8�
8��
8�	8�
�
#�
#�I�s�
3�	8�
�t�
$�
8�
8�%�
8�	8�	8�	7�	7��
	8�	8��
	8�	8�s#�B �B,�=B8� B)�,B5�8Cc�`�td��Gd�d��}|jt|�dj�td��Gd�d��}|jt|�dj�td��Gd�d��}|j	t|�dj�td��Gd	�d��}|j	t|�dj�td��Gd
�d��}|jt|�dj�td��Gd�d��}|j	t|�dj�tGd�d��}|j	t|�dj�tGd
�d��}|jt|�dj�tGd�d��}|j	t|�dj�y)NTr4c��eZdZUeed<y��6TestKeywordArgs.test_field_marked_as_kwonly.<locals>.Ar%Nr9rrrr�r?�r<rr�rc�*�eZdZUed��Zeed<y�r?Tr4r%N�rrrrGr%r:r;rrrr�z6TestKeywordArgs.test_field_marked_as_kwonly.<locals>.A�����4�(�A�s�(rc�*�eZdZUed��Zeed<y�r?Fr4r%NrBrrrr�z6TestKeywordArgs.test_field_marked_as_kwonly.<locals>.A�����5�)�A�s�)rFc��eZdZUeed<yr>r9rrrr�z6TestKeywordArgs.test_field_marked_as_kwonly.<locals>.A�r<rc�*�eZdZUed��Zeed<yrArBrrrr�z6TestKeywordArgs.test_field_marked_as_kwonly.<locals>.A�rCrc�*�eZdZUed��Zeed<yrErBrrrr�z6TestKeywordArgs.test_field_marked_as_kwonly.<locals>.A�rFrc��eZdZUeed<yr>r9rrrr�z6TestKeywordArgs.test_field_marked_as_kwonly.<locals>.A�r<rc�*�eZdZUed��Zeed<yrArBrrrr�z6TestKeywordArgs.test_field_marked_as_kwonly.<locals>.A�rCrc�*�eZdZUed��Zeed<yrErBrrrr�z6TestKeywordArgs.test_field_marked_as_kwonly.<locals>.A�rFr)r(rvr+r5r�r�s  r�test_field_marked_as_kwonlyz+TestKeywordArgs.test_field_marked_as_kwonly�s���
�4�	 �	�	�
!�	�����q�	�!��,�,�-�	�4�	 �	)�	)�
!�	)�����q�	�!��,�,�-�	�4�	 �	*�	*�
!�	*�������1��-�-�.�
�5�	!�	�	�
"�	�������1��-�-�.�	�5�	!�	)�	)�
"�	)�����q�	�!��,�,�-�	�5�	!�	*�	*�
"�	*�������1��-�-�.�
�	�	�
�	�������1��-�-�.�	�	)�	)�
�	)�����q�	�!��,�,�-�	�	*�	*�
�	*�������1��-�-�.rc���td��Gd�d��}|j|d��jd�tGd�d��}|j|dd	�
�jd�y)NTr4c��eZdZUeed<y)�*TestKeywordArgs.test_match_args.<locals>.Cr%Nr9rrrr%rP�r<rr%r=r�rc�4�eZdZUeed<ed��Zeed<y)rPr%Tr4rN)rrrr:r;rGrrrrr%z*TestKeywordArgs.test_match_args.<locals>.C�s���F��4�(�A�s�(rr�rPrr�s  rrzTestKeywordArgs.test_match_args�sm��	�4�	 �	�	�
!�	�����R��/�/��4�	�	)�	)�
�	)�	
����2���3�3�V�<rc��tGd�d��}|ddd��d}|jt|�5|ddd�ddd�td�	�Gd
�d��}|ddd��d
}|jt|�5|ddd�ddd�tGd�d��}|ddd��}|j|jd�|j|j
d�|j|jd�|ddd��}|j|jd�|j|j
d�|j|jd�|ddd��}|j|jd�|j|j
d�|j|jd�|ddd��}|j|jd�|j|j
d�|j|jd�y#1swY���xYw#1swY���xYw)Nc�6�eZdZUeed<eed<eed<eed<y)�'TestKeywordArgs.test_KW_ONLY.<locals>.Ar%r�rr�N�rrrr:r;�KW_ONLYrrrr�rT����F��J��F��Frr�r�r�r��r�r�-takes 2 positional arguments but 4 were givenTr4c�6�eZdZUeed<eed<eed<eed<y)�'TestKeywordArgs.test_KW_ONLY.<locals>.Br%r�rr�NrUrrrr�r[rWrr�rz,takes 1 positional argument but 4 were givenc�H�eZdZUeed<eed<eed<ed��Zeed<y)�'TestKeywordArgs.test_KW_ONLY.<locals>.Cr%r�rFr4r�N�rrrr:r;rVrGr�rrrr%r]s ���F��J��F��5�)�A�s�)rr%rCrMrP)rr�)r�rr%)r(rHr�r)r%rr�)r-r�rJr�r%r�s      r�test_KW_ONLYzTestKeywordArgs.test_KW_ONLYs���	�	�	�
�	�
	
�!�q�A��=��
�
#�
#�I�s�
3�	�
�a��A�J�	�
�4�	 �	�	�
!�	�
	
�A��a��<��
�
#�
#�I�s�
3�	�
�a��A�J�	�
�	*�	*�
�	*�

�a��a�L��������a� �������a� �������a� �
�a�1��N��������a� �������a� �������a� �
�a�1��N��������a� �������a� �������a� �
��Q�!���������a� �������a� �������a� �K	�	��	�	�s�H)�H6�)H3�6Ic��tGd�d��}|ddd��d}|jt|�5|ddd�ddd�y#1swYyxYw)Nc�6�eZdZUeed<ded<eed<eed<y)�1TestKeywordArgs.test_KW_ONLY_as_string.<locals>.Ar%zdataclasses.KW_ONLYr�rr�Nr9rrrr�rb4s���F�$�$��F��Frr�r�r�r�rXrYr�)r-r�rJs   r�test_KW_ONLY_as_stringz&TestKeywordArgs.test_KW_ONLY_as_string3s[��	�	�	�
�	�
	
�!�q�A��=��
�
#�
#�I�s�
3�	�
�a��A�J�	�	�	�s�A�Ac��d}|jt|�5tGd�d��}ddd�|jt|�5tGd�d��}ddd�|jt|�5tGd�d��}ddd�tGd�d��}tGd�d��}tGd�d	|��}|jt|�5tGd
�d��}tGd�d	|��}ddd�y#1swY��xYw#1swY��xYw#1swY��xYw#1swYyxYw)Nz6'Y' is KW_ONLY, but KW_ONLY has already been specifiedc�@�eZdZUeed<eed<eed<eed<eed<y)�-TestKeywordArgs.test_KW_ONLY_twice.<locals>.Ar%r�r�rr�NrUrrrr�rfCs�����
��
����rr�c�@�eZdZUeed<eed<eed<eed<eed<y)rfr%r�rr�r�NrUrrrr�z-TestKeywordArgs.test_KW_ONLY_twice.<locals>.ALs�����
����
��rc�@�eZdZUeed<eed<eed<eed<eed<y)rfr%r�rr�r�NrUrrrr�z-TestKeywordArgs.test_KW_ONLY_twice.<locals>.AUs�����
������
rc�H�eZdZUeed<eed<eed<ed��Zeed<y)rfr%r�rTr4r�Nr^rrrr�z-TestKeywordArgs.test_KW_ONLY_twice.<locals>.A^s ���F��J��F��4�(�A�s�(rc�6�eZdZUeed<eed<eed<eed<y�rfr%r�rr�NrUrrrr�z-TestKeywordArgs.test_KW_ONLY_twice.<locals>.AfrWrc�"�eZdZUeed<eed<y)�-TestKeywordArgs.test_KW_ONLY_twice.<locals>.Br�r�N�rrrrVr;r:rrrr�rmls���J��Frr�c�6�eZdZUeed<eed<eed<eed<yrkrUrrrr�z-TestKeywordArgs.test_KW_ONLY_twice.<locals>.Ass�����
����rc�,�eZdZUeed<eed<eed<y)rmr�r�r�Nrnrrrr�z-TestKeywordArgs.test_KW_ONLY_twice.<locals>.Bys���
����
rr>)r-rJr�r�s    r�test_KW_ONLY_twicez"TestKeywordArgs.test_KW_ONLY_twice?sk��F��
�
#�
#�I�s�
3�	�
�
�
��
�	��
#�
#�I�s�
3�	�
�
�
��
�	��
#�
#�I�s�
3�	�
�
�
��
�	�
�	)�	)�
�	)�
�	�	�
�	�

�	��	�
�	�
�
#�
#�I�s�
3�	�
�
�
��
�
�
�A�
��
�	�	�a	�	��	�	��	�	��<	�	�s/�D�D&�=D2�)(D>�D#�&D/�2D;�>Ec��tGd�d��}|jtd�5|dddd��ddd�tGd	�d
��}|dddd��}|jt	|�ddd��y#1swY�GxYw)Nc�R�eZdZUeed<eed<eeed<eed<eeed<d�Zy)�)TestKeywordArgs.test_post_init.<locals>.Ar%r�rr�r�c�$�td|�d|����)Nzb=z d=rb�r-rr�s   rrcz7TestKeywordArgs.test_post_init.<locals>.A.__post_init__�s��!�R�Q�D��!��,�/�/rN�rrrr:r;rVr�rcrrrr�rt�s(���F��J��s�|�O��F��s�|�O�
0rr�zb=3 d=4rCrMr�r�)r�rr�c�R�eZdZUeed<eed<eeed<eed<eeed<d�Zy)�)TestKeywordArgs.test_post_init.<locals>.Br%r�rr�r�c� �||_||_yr��r%r�rvs   rrcz7TestKeywordArgs.test_post_init.<locals>.B.__post_init__�s�������rNrwrrrr�ry�s(���F��J��s�|�O��F��s�|�O�
rr�r{)r(rHrr)rV)r-r�r�rs    rruzTestKeywordArgs.test_post_init�s���	�	0�	0�
�	0��
#�
#�K��
;�	 �
�a�1��Q��	 �
�	�	�
�	�
�a�1��Q���������!�!�$4�5�	 �	 �s�
A=�=Bc��tGd�d��}|dd��}|j|jd�|j|jd�|j|jd�|j|j
d�d}|j
t|�5tGd	�d��}ddd�y#1swYyxYw)
Nc�H�eZdZUdZeed<eed<eed<dZeed<eed<y)	�(TestKeywordArgs.test_defaults.<locals>.Arr%r�rrCr�r�N�rrrr%r:r;rVr�rrrr�r~�s#���A�s�J��J��F��A�s�J��Frr�r�r�)r�rrrCz1non-default argument 'z' follows default argumentc�R�eZdZUdZeed<eed<eed<eed<dZeed<eed<y	)
r~rr%r�r�rrCr�r�Nrrrrr�z(TestKeywordArgs.test_defaults.<locals>.A�s(����3�
����
�����3�
��r)r(r)r%rr�r�rHr�)r-r�r%�	err_regexs    r�
test_defaultszTestKeywordArgs.test_defaults�s���	�	�	�
�	�
��Q�K��������a� �������a� �������a� �������a� �H�	�
�
#�
#�I�y�
9�	�
�
�
��
�	�	�	�s�&C�Cc	�N�tddgd��}|jt|�dj�tdddttd��fgd��}|jt|�dj�|j
t|�d	j�y)
Nr�r%Tr4rr�rFrC)rrvr+r5r:rGr�rWs   r�test_make_dataclassz#TestKeywordArgs.test_make_dataclass�s����3���t�4������q�	�!��,�,�-��3��#�s�E�%�,@�!A�B�#'�
)��	
����q�	�!��,�,�-�������1��-�-�.rN)rrrr;rMrr_rcrqrur�r�rrrr0r0�s2��8�"2/�h=�.!�`
�>�B6�4�:/rr0�__main__);�dataclassesr�rlr�rsrr^r�rn�unittest�
unittest.mockr�typingrrrrr	r
rrr
rrr�collectionsrrrr�	functoolsr�	Exceptionrr!r�r�rr.rOrcr~r�rr�r-rr:rZrr[r�r^rar�r�rr0�mainrrr�<module>r�s(��
�
�	�
��������m�m�m�m�!�C�C�$�
��#�)�"�b!�x� � �b!�JC �H�-�-� �Fc/�H�%�%�c/�LR%�x� � �R%�jD*�x� � �D*�N,%�X�
�
�,%�^J�8�$�$�J�XYM�x� � �YM�xW��"�"�W�tq,��!�!�q,�hs�h�'�'�s�jX$�H�-�-�X$�v!�!2�c�3�Z�L�A��*�+F�-0�#�J�<�2:�<��(��3��*��>��)�*D�,/��:�,�19�;��@8��)�)�@8�DT=�(�#�#�T=�H"5�8�$�$�"5�J>3�H�%�%�>3�BO/�h�'�'�O/�d�z���H�M�M�O�r