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

�i�h�@s�ddlZddlmZzddlZWneydZYnwddlZddlZddlZddlZddl	Z	Gdd�de
�ZGdd�dej�Z
eGdd�dej��ZGd	d
�d
ej�ZGdd�de�ZGd
d�de�ZGdd�de�ZGdd�de�Zdd�Zdd�ZGdd�d�Ze�Ze�ZGdd�dej�ZdZdZdd�Zdd �ZGd!d"�d"ej�ZGd#d$�d$�Z eGd%d&�d&ej��Z!e"d'kr�e�#�dSdS)(�N)�cpython_onlyc@seZdZdd�Zdd�ZdS)�BadStrcC�dS)NT�)�self�otherrr�+/usr/local/lib/python3.10/test/test_call.py�__eq__�z
BadStr.__eq__cCst�|�dAS)N�)�str�__hash__�rrrrr
szBadStr.__hash__N)�__name__�
__module__�__qualname__r	r
rrrrrsrc@�eZdZdd�ZdS)�
FunctionCallscCs^t�ddg�}|�d�t|���}dd�}|di|��}|�|t�|�t|���|�dS)N)�a�)�b�rc[�|S�Nr)�kwrrr�fnr
z+FunctionCalls.test_kwargs_order.<locals>.fnr)�collections�OrderedDict�move_to_end�list�itemsZassertIsInstance�dict�assertEqual)rZod�expectedr�resrrr�test_kwargs_orders
zFunctionCalls.test_kwargs_orderN)rrrr%rrrrrsrc@s$eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�Z d=d>�Z!d?d@�Z"dAdB�Z#dCdD�Z$dEdF�Z%dGS)H�CFunctionCallsErrorMessagescCsd}|�t|ij�dS)Nz7__contains__\(\) takes exactly one argument \(0 given\)��assertRaisesRegex�	TypeError�__contains__�r�msgrrr�
test_varargs0)�z)CFunctionCallsErrorMessages.test_varargs0cC�d}|�t|ijdd�dS)Nz7__contains__\(\) takes exactly one argument \(2 given\)rrr'r+rrr�
test_varargs2-�z)CFunctionCallsErrorMessages.test_varargs2cCsd}|�t|tjddd�dS)Nz@^from_bytes\(\) takes exactly 2 positional arguments \(3 given\)�a�littleF)r(r)�int�
from_bytesr+rrr�
test_varargs31�z)CFunctionCallsErrorMessages.test_varargs3cCs,d}|�t|ij�d}|�t|ij�dS)Nz'get expected at least 1 argument, got 0zexpected 1 argument, got 0)r(r)�get�__delattr__r+rrr�test_varargs1min5sz,CFunctionCallsErrorMessages.test_varargs1mincCsd}|�t|t�dS)Nz,getattr expected at least 2 arguments, got 0�r(r)�getattrr+rrr�test_varargs2min<sz,CFunctionCallsErrorMessages.test_varargs2mincCsd}|�t|tdd�dS)Nz(input expected at most 1 argument, got 2rr)r(r)�inputr+rrr�test_varargs1max@�z,CFunctionCallsErrorMessages.test_varargs1maxcCsd}|�t|ijddd�dS)Nz'get expected at most 2 arguments, got 3rrr)r(r)r8r+rrr�test_varargs2maxDr7z,CFunctionCallsErrorMessages.test_varargs2maxcC�d}|jt|ijdd�dS)N�+__contains__\(\) takes no keyword argumentsr��xr'r+rrr�test_varargs1_kwHr1z,CFunctionCallsErrorMessages.test_varargs1_kwcC�d}|jt|ijddd�dS)NrCr�rE�yr'r+rrr�test_varargs2_kwLr7z,CFunctionCallsErrorMessages.test_varargs2_kwcC�d}|jt|tdd�dS)Nz#bool\(\) takes no keyword argumentsrrD)r(r)�boolr+rrr�test_varargs3_kwPr@z,CFunctionCallsErrorMessages.test_varargs3_kwcC�d}|jt|gjdd�dS)Nz-^list[.]index\(\) takes no keyword arguments$rrD)r(r)�indexr+rrr�test_varargs4_kwTr1z,CFunctionCallsErrorMessages.test_varargs4_kwcCrK)Nz(^hasattr\(\) takes no keyword arguments$rrD)r(r)�hasattrr+rrr�test_varargs5_kwXr@z,CFunctionCallsErrorMessages.test_varargs5_kwcCrK)Nz(^getattr\(\) takes no keyword arguments$rrDr;r+rrr�test_varargs6_kw\r@z,CFunctionCallsErrorMessages.test_varargs6_kwcCrK)Nz%^next\(\) takes no keyword arguments$rrD)r(r)�nextr+rrr�test_varargs7_kw`r@z,CFunctionCallsErrorMessages.test_varargs7_kwcC�d}|jt|tjdd�dS)Nz/^_struct[.]pack\(\) takes no keyword arguments$rrD)r(r)�struct�packr+rrr�test_varargs8_kwdr1z,CFunctionCallsErrorMessages.test_varargs8_kwcCrV)Nz4^_struct[.]pack_into\(\) takes no keyword arguments$rrD)r(r)rW�	pack_intor+rrr�test_varargs9_kwhr1z,CFunctionCallsErrorMessages.test_varargs9_kwcCs d}|jt|t��jdd�dS)Nz.^deque[.]index\(\) takes no keyword arguments$rrD)r(r)r�dequerOr+rrr�test_varargs10_kwlsz-CFunctionCallsErrorMessages.test_varargs10_kwcCs&d}|jt|tjjt�d�dd�dS)Nz.^Struct[.]pack\(\) takes no keyword arguments$�rrD)r(r)rW�StructrXr+rrr�test_varargs11_kwps"z-CFunctionCallsErrorMessages.test_varargs11_kwcC�d}|jt|ttd�dS)Nz-^staticmethod\(\) takes no keyword arguments$��func)r(r)�staticmethod�idr+rrr�test_varargs12_kwtr@z-CFunctionCallsErrorMessages.test_varargs12_kwcCra)Nz,^classmethod\(\) takes no keyword arguments$rb)r(r)�classmethodrer+rrr�test_varargs13_kwxr@z-CFunctionCallsErrorMessages.test_varargs13_kwcCs d}|jt|tjdddd�dS)Nz:^product\(\) takes at most 1 keyword argument \(2 given\)$rrr)�repeat�foo)r(r)�	itertools�productr+rrr�test_varargs14_kw|�

�z-CFunctionCallsErrorMessages.test_varargs14_kwc	C� d}|jt|tddddd�dS)Nz?^ImportError\(\) takes at most 2 keyword arguments \(3 given\)$rrrr)�name�pathrj)r(r)�ImportErrorr+rrr�test_varargs15_kw�rnz-CFunctionCallsErrorMessages.test_varargs15_kwc	Cro)Nz7^min\(\) takes at most 2 keyword arguments \(3 given\)$rrrr)�default�keyrj)r(r)�minr+rrr�test_varargs16_kw�rnz-CFunctionCallsErrorMessages.test_varargs16_kwcCs$d}|jt|tddddddd�	dS)	Nz9^print\(\) takes at most 4 keyword arguments \(5 given\)$rrrr��)�sep�end�file�flushrj)r(r)�printr+rrr�test_varargs17_kw�s
�z-CFunctionCallsErrorMessages.test_varargs17_kwcCsLd}|�t|��tditd�di��Wd�dS1swYdS)Nz'invalid keyword argument for print\(\)$rrrj�,)rr)r(r)r~rr+rrr�test_varargs18_kw��"�z-CFunctionCallsErrorMessages.test_varargs18_kwcCsLd}|�t|��tditd�di��Wd�dS1swYdS)Nz'invalid keyword argument for round\(\)$��?rjr)r�)r(r)�roundrr+rrr�test_varargs19_kw�r�z-CFunctionCallsErrorMessages.test_varargs19_kwcCsd}|�t|ijd�dS)Nz'keys\(\) takes no arguments \(1 given\)r�r(r)�keysr+rrr�test_oldargs0_1�r@z+CFunctionCallsErrorMessages.test_oldargs0_1cCr/)Nz'keys\(\) takes no arguments \(2 given\)rrr�r+rrr�test_oldargs0_2�r1z+CFunctionCallsErrorMessages.test_oldargs0_2cCrB)N�#keys\(\) takes no keyword argumentsrrDr�r+rrr�test_oldargs0_1_kw�r1z.CFunctionCallsErrorMessages.test_oldargs0_1_kwcCrG)Nr�rrHr�r+rrr�test_oldargs0_2_kw�r7z.CFunctionCallsErrorMessages.test_oldargs0_2_kwcCsd}|�t|gj�dS)Nz0count\(\) takes exactly one argument \(0 given\)�r(r)�countr+rrr�test_oldargs1_0�r.z+CFunctionCallsErrorMessages.test_oldargs1_0cCsd}|�t|gjdd�dS)Nz0count\(\) takes exactly one argument \(2 given\)rrr�r+rrr�test_oldargs1_2�r1z+CFunctionCallsErrorMessages.test_oldargs1_2cCrN�N�$count\(\) takes no keyword argumentsrrDr�r+rrr�test_oldargs1_0_kw�r1z.CFunctionCallsErrorMessages.test_oldargs1_0_kwcCsd}|jt|gjidd�dSr�r�r+rrr�test_oldargs1_1_kw�r7z.CFunctionCallsErrorMessages.test_oldargs1_1_kwcCsd}|jt|gjddd�dS)Nr�rrHr�r+rrr�test_oldargs1_2_kw�r7z.CFunctionCallsErrorMessages.test_oldargs1_2_kwN)&rrrr-r0r6r:r=r?rArFrJrMrPrRrSrUrYr[r]r`rfrhrmrsrwrr�r�r�r�r�r�r�r�r�r�r�rrrrr&&sHr&c@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2S)3�TestCallingConventionsa�Test calling using various C calling conventions (METH_*) from Python

    Subclasses test several kinds of functions (module-level, methods,
    class methods static methods) using these attributes:
      obj: the object that contains tested functions (as attributes)
      expected_self: expected "self" argument to the C function

    The base class tests module-level functions.
    cCst|_|_dSr)�	_testcapi�obj�
expected_selfrrrr�setUp�szTestCallingConventions.setUpcC�"|�|j�ddd�|jdf�dS�Nrrr�rrr�r"r��meth_varargsr�rrrr�test_varargs���z#TestCallingConventions.test_varargscC�|�|jjd�|jdf�dS�Nr�r�rrrr�test_varargs_ext��
�z'TestCallingConventions.test_varargs_extc�d}��t|�fdd��dS)Nz+meth_varargs\(\) takes no keyword argumentsc��jjdd�S�Nr)�k)r�r�rrrr�<lambda>��z>TestCallingConventions.test_varargs_error_kw.<locals>.<lambda>�r(r)r+rrr�test_varargs_error_kw���z,TestCallingConventions.test_varargs_error_kwcC�.|�|jjddddd�|jdddd�f�dS�Nrrrrx�rr�rr�r"r��meth_varargs_keywordsr�rrrr�test_varargs_keywords���z,TestCallingConventions.test_varargs_keywordscCs6|�|jjddgiddd���|jdddd�f�dSr�r�rrrr�test_varargs_keywords_ext�s�z0TestCallingConventions.test_varargs_keywords_extcCs|�|j�d�|jdf�dS�Nr�r"r��meth_or�rrrr�test_o�szTestCallingConventions.test_ocCs |�|jjdg�|jdf�dSr�r�rrrr�
test_o_ext�s z!TestCallingConventions.test_o_extcCsd}|�t||jj�dS)Nz1meth_o\(\) takes exactly one argument \(0 given\))r(r)r�r�r+rrr�test_o_error_no_arg�r@z*TestCallingConventions.test_o_error_no_argcr�)Nz1meth_o\(\) takes exactly one argument \(2 given\)c��j�dd�S�Nrr�r�r�rrrrr��r�z>TestCallingConventions.test_o_error_two_args.<locals>.<lambda>r�r+rrr�test_o_error_two_args�r�z,TestCallingConventions.test_o_error_two_argscr�)Nz1meth_o\(\) takes exactly one argument \(3 given\)c��jjd�Sr�r�rrrrr��z9TestCallingConventions.test_o_error_ext.<locals>.<lambda>r�r+rrr�test_o_error_ext�r�z'TestCallingConventions.test_o_error_extcr�)N�%meth_o\(\) takes no keyword argumentscr�r�r�rrrrr�r�z8TestCallingConventions.test_o_error_kw.<locals>.<lambda>r�r+rrr�test_o_error_kwr�z&TestCallingConventions.test_o_error_kwcr�)Nr�cr�r�r�rrrrr�
r�z<TestCallingConventions.test_o_error_arg_kw.<locals>.<lambda>r�r+rrr�test_o_error_arg_kw
r�z*TestCallingConventions.test_o_error_arg_kwcCs|�|j��|j�dSr�r"r��meth_noargsr�rrrr�test_noargssz"TestCallingConventions.test_noargscCs|�|jjg�|j�dSrr�rrrr�test_noargs_extsz&TestCallingConventions.test_noargs_extcr�)Nz.meth_noargs\(\) takes no arguments \(1 given\)cs�j�d�Sr��r�r�rrrrr�r�z>TestCallingConventions.test_noargs_error_arg.<locals>.<lambda>r�r+rrr�test_noargs_error_argr�z,TestCallingConventions.test_noargs_error_argcr�)Nz.meth_noargs\(\) takes no arguments \(2 given\)cr�r�r�rrrrr�r�z?TestCallingConventions.test_noargs_error_arg2.<locals>.<lambda>r�r+rrr�test_noargs_error_arg2r�z-TestCallingConventions.test_noargs_error_arg2cr�)Nz.meth_noargs\(\) takes no arguments \(3 given\)cr�r�r�rrrrr�%r�z>TestCallingConventions.test_noargs_error_ext.<locals>.<lambda>r�r+rrr�test_noargs_error_ext"r�z,TestCallingConventions.test_noargs_error_extcr�)Nz*meth_noargs\(\) takes no keyword argumentscr�r�r�rrrrr�+r�z=TestCallingConventions.test_noargs_error_kw.<locals>.<lambda>r�r+rrr�test_noargs_error_kw(r�z+TestCallingConventions.test_noargs_error_kwcCr�r��r"r��
meth_fastcallr�rrrr�
test_fastcall.r�z$TestCallingConventions.test_fastcallcCr�r�r�rrrr�test_fastcall_ext4r�z(TestCallingConventions.test_fastcall_extcr�)Nz,meth_fastcall\(\) takes no keyword argumentscr�r�)r�r�rrrrr�=r�z?TestCallingConventions.test_fastcall_error_kw.<locals>.<lambda>r�r+rrr�test_fastcall_error_kw:r�z-TestCallingConventions.test_fastcall_error_kwcCr�r��r"r��meth_fastcall_keywordsr�rrrr�test_fastcall_keywords@r�z-TestCallingConventions.test_fastcall_keywordscCs2|�|jjdiddd���|jdddd�f�dS)Nr�rrxr�r�rrrr�test_fastcall_keywords_extFs�z1TestCallingConventions.test_fastcall_keywords_extN)rrr�__doc__r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr��s4
r�c@�eZdZdZdd�ZdS)�TestCallingConventionsInstancez?Test calling instance methods using various calling conventionscCst��|_|_dSr)r��MethInstancer�r�rrrrr�Psz$TestCallingConventionsInstance.setUpN�rrrr�r�rrrrr�M�r�c@r�)�TestCallingConventionsClassz<Test calling class methods using various calling conventionscCstj|_|_dSr�r��	MethClassr�r�rrrrr�Wsz!TestCallingConventionsClass.setUpNr�rrrrr�Tr�r�c@r�)�#TestCallingConventionsClassInstancez&Test calling class methods on instancecCst��|_tj|_dSrr�rrrrr�^s
z)TestCallingConventionsClassInstance.setUpNr�rrrrr�[r�r�c@r�)�TestCallingConventionsStaticz=Test calling static methods using various calling conventionscCst��|_d|_dSr)r��
MethStaticr�r�rrrrr�fs

z"TestCallingConventionsStatic.setUpNr�rrrrr�cr�r�cCs||gSrr��arg1�arg2rrr�pyfunck�r�cCr�N�noargrrrrr�pyfunc_noargor
r�c@s4eZdZdd�Zdd�Zedd��Zedd��Zd	S)
�PythonClasscCs||gSrr)rr�r�rrr�methodtr�zPythonClass.methodcCrr�rrrrr�method_noargwr
zPythonClass.method_noargcCr)Nrgr)�clsrrr�class_methodz�zPythonClass.class_methodcCr)Nrdrrrrr�
static_method~r�zPythonClass.static_methodN)	rrrr�r�rgr�rdr�rrrrr�ss
r�c@s6eZdZdZedddgfeddfejddfejddfe	j
dddgfe	jddfe	jddfe	jddfgZed	d
diddgfedddd�ddgfe	j
d	d
diddgfe	j
dddd�ddgfgZ
e��Zeefeefejejfe��ejfejdffD]�\ZZe�ejdedffejdedeffejdedffejdedffejdedeffejdedeffejdefejd
edffg�e
�ejdddiedddiffejdddiedddiffejdiedeffejdddiedddiffejdddiedddiffejdiedeffg�qwdd�Zdd�Zdd�Zdd�Z dd�Z!dS)�
FastCallTestsz0Test calling using various callables from C
    r�rrrr�rgrd)rr�r�N)�{r�rErIcCsPt|t�r |dtur |didfvr g|dd��|d�R}|�||�dS)N���)�
isinstance�tuple�
NULL_OR_EMPTYr")r�resultr#rrr�check_result�szFastCallTests.check_resultc	Csx|jD]6\}}}|j||d��"t�||�}|�||�|s*t�|d�}|�||�Wd�n1s4wYqdS)N�rc�args)�
CALLS_POSARGS�subTestr�Zpyobject_fastcallr�)rrcr�r#r�rrrr��s����zFastCallTests.test_fastcallc	Cs�|jD]8\}}}|j||d��$t�||d�}|�||�|s,t�|dd�}|�||�Wd�n1s6wYq|jD]+\}}}}|j|||d��t�|||�}|�||�Wd�n1sewYq?dS)Nr��rcr��kwargs)r�rr�Zpyobject_fastcalldictr��CALLS_KWARGS)rrcr�r#r�rrrr�test_vectorcall_dict�s"���
���z"FastCallTests.test_vectorcall_dictc	Cs*|jD]R\}}}|j||d��>t�||d�}|�||�t�||d�}|�||�|sFt�|dd�}|�||�t�|dd�}|�||�Wd�n1sPwYq|jD]9\}}}}|j|||d��#t|���}|t|���}t�|||�}|�||�Wd�n1s�wYqYdS)Nr�rr)	r�rr��pyobject_vectorcallr�rr�r��values)rrcr�r#r�r�kwnamesrrr�test_vectorcall�s.������zFastCallTests.test_vectorcallcCs6Gdd�d�}||�d�}tddd|fi|j��dS)Nc@s"eZdZdgZdd�Zdd�ZdS)z>FastCallTests.test_fastcall_clearing_dict.<locals>.IntWithDictrc[s
||_dSr)r)rrrrr�__init__s
zGFastCallTests.test_fastcall_clearing_dict.<locals>.IntWithDict.__init__cSs|j��t��dS)Nr)r�clear�gcZcollectrrrr�	__index__!s
zHFastCallTests.test_fastcall_clearing_dict.<locals>.IntWithDict.__index__N)rrr�	__slots__r	rrrrr�IntWithDictsr)�optimize�passr^�exec)�compiler)rrrErrr�test_fastcall_clearing_dictsz)FastCallTests.test_fastcall_clearing_dict)"rrrr�r�r�r�r�r��PYTHON_INSTANCEr�r�r�rr�r�Z	_instancer�r�r�r��extendr�r�r�r�r�r�r�r�r�rrrrrrrr��s�




��
�
�
�
�
��������
r�iicCr�zsome docrrrrr�testfunction0r�rcCrrr)rrrrr�testfunction_kw5r�rc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
TestPEP590cCs�ddl}|�d�t�}|�tt�jt@�|�tt	j
�jt@�|�tt	j�jt@�|�tt�jt@�|�t|�jt@�|�tj
jt@�|�tjjt@�|�tjjt@�Gdd�dtj
�}|�|jt@�dS)Nrrc@�eZdZdS)zDTestPEP590.test_method_descriptor_flag.<locals>.MethodDescriptorHeapN�rrrrrrr�MethodDescriptorHeapK�r)�	functools�	lru_cacher�assertFalse�type�repr�	__flags__�Py_TPFLAGS_METHOD_DESCRIPTOR�
assertTruer�append�__add__r��MethodDescriptorBase�MethodDescriptorDerived�MethodDescriptorNopGet)rr�cachedrrrr�test_method_descriptor_flag<sz&TestPEP590.test_method_descriptor_flagcCsn|�tjjt@�|�tjjt@�|�tjjt@�|�tjjt@�Gdd�dtj�}|�|jt@�dS)Nc@r)z=TestPEP590.test_vectorcall_flag.<locals>.MethodDescriptorHeapNrrrrrrVrr)	r%r�r(r#�Py_TPFLAGS_HAVE_VECTORCALLr)r r*�MethodDescriptor2)rrrrr�test_vectorcall_flagOszTestPEP590.test_vectorcall_flagcCs(ttd��}t��}|�||�|�dS)Nry)r��ranger�r*ZassertIs)rr��frrr�test_vectorcall_overrideZsz#TestPEP590.test_vectorcall_overridecs�ttd�fidftjgdfidfgjdidftdgfddidftdidftdddidft��did	ft�	�did	ft�
�did
fg	}ddlm�m}ddl
m}dd
lm}�fdd�}|D]2\}}}}	|�t|���|sw|�|	|||��|�|	||||��Wd�n1s�wYq^Gdd�dtj�}
Gdd�dtj�}Gdd�d�}Gdd�d|tj�}
|tjifdd	idfijifdd	idf|
�did	f|�didf|
�did	fg7}|D]\}}}}	|�t|���i|dd�}|||d�}||�}|�s"|�|	||��|�|	�||d��|�|	||��|�|	||��|�|	||i|���|�|	||||��|�|	||i|���|�|	||i|���Wd�n	1�sXwYq�dS)N�*r)r�$�start�)r3rTF)r�pyvectorcall_call)�
MethodType)�partialcs&g|�|���R}t|�}�|||�Sr)rr�)rcr�rr�rrr�
vectorcall|sz.TestPEP590.test_vectorcall.<locals>.vectorcallc@r)z8TestPEP590.test_vectorcall.<locals>.MethodDescriptorHeapNrrrrrr�rrc@r)z>TestPEP590.test_vectorcall.<locals>.MethodDescriptorOverriddencSr)N�newr)r�nrrr�__call__�r
zGTestPEP590.test_vectorcall.<locals>.MethodDescriptorOverridden.__call__N)rrrr>rrrr�MethodDescriptorOverridden�sr?c�eZdZ�fdd�Z�ZS)z-TestPEP590.test_vectorcall.<locals>.SuperBasec�t�j|�Sr��superr>�rr���	__class__rrr>��z6TestPEP590.test_vectorcall.<locals>.SuperBase.__call__�rrrr>�
__classcell__rrrEr�	SuperBase��rJcr@)z9TestPEP590.test_vectorcall.<locals>.MethodDescriptorSupercrArrBrDrErrr>�rGzBTestPEP590.test_vectorcall.<locals>.MethodDescriptorSuper.__call__rHrrrEr�MethodDescriptorSuper�rKrLrur<r)�lenr0rr&�sumrrr�r(r)r.rr7�typesr8rr9rrr"r!�update)rZcallsr7r8r9r;rcr�rr#rr?rJrLZargs1�meth�wrappedrr:rrdsb

�
������zTestPEP590.test_vectorcallN)rrrr,r/r2rrrrrr:s

rc@s,eZdZdd�Zedd��Zedd��ZdS)�AcC�dSrr)rrErIrrr�method_two_args�r
zA.method_two_argscCrTrrrrrr�static_no_args�r�zA.static_no_argscCrTrr��argrrr�positional_only�r�zA.positional_onlyN)rrrrUrdrVrYrrrrrS�s
rSc@sBeZdZejdd��Zdd�Zdd�Zdd�Zd	d
�Z	dd�Z
d
S)�!TestErrorMessagesUseQualifiedNameccsH�|�t��}dVWd�n1swY|�t|j�|�dSr)ZassertRaisesr)r"r�	exception)r�message�cmrrr�check_raises_type_error�s
��z9TestErrorMessagesUseQualifiedName.check_raises_type_errorcCs@d}|�|��t��d�Wd�dS1swYdS)Nz?A.method_two_args() missing 1 required positional argument: 'y'rE�r^rSrUr+rrr�test_missing_arguments��"�z8TestErrorMessagesUseQualifiedName.test_missing_argumentscCs>d}|�|��t�d�Wd�dS1swYdS)Nz?A.static_no_args() takes 0 positional arguments but 1 was givenzoops it's an arg)r^rSrVr+rrr�test_too_many_positional�s"�z:TestErrorMessagesUseQualifiedName.test_too_many_positionalcCs@d}|�|��tjdd�Wd�dS1swYdS)NzYA.positional_only() got some positional-only arguments passed as keyword arguments: 'arg'rErW)r^rSrYr+rrr�&test_positional_only_passed_as_keyword�razHTestErrorMessagesUseQualifiedName.test_positional_only_passed_as_keywordcCsBd}|�|��t�jdd�Wd�dS1swYdS)Nz<A.method_two_args() got an unexpected keyword argument 'bad'rE)Zbadr_r+rrr�test_unexpected_keyword�s"�z9TestErrorMessagesUseQualifiedName.test_unexpected_keywordcCsFd}|�|��t�jdddd�Wd�dS1swYdS)Nz8A.method_two_args() got multiple values for argument 'x'rErIZoopsrDr_r+rrr�test_multiple_values�s"�z6TestErrorMessagesUseQualifiedName.test_multiple_valuesN)rrr�
contextlib�contextmanagerr^r`rbrcrdrerrrrrZ�s
rZ�__main__)$ZunittestZtest.supportrr�rrrWrrkrrfrrZTestCaserr&r�r�r�r�r�r�r�r�r�objectr�r�r-r$rrrrSrZr�mainrrrr�<module>sR�&w"�