Your IP : 3.145.78.12


Current Path : /opt/alt/python34/lib64/python3.4/idlelib/idle_test/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/idlelib/idle_test/__pycache__/test_calltips.cpython-34.pyo

�
e f��@s�ddlZddljZddlZddlZejZGdd�d�Ze�Z	ej
ZGdd�dej�Z
Gdd�dej�Zedkr�ejd	d
dd�ndS)
�Nc@s�eZdZdZdZddd�Zde_dd�Zd	e_dd
d�Zde_d
d�Zde_dd�Z	de	_ddd�Z
de
_dd�Zde_dd�Zde_e
dd��Zedd��ZdS) �TC�docz
(ai=None, *b)NcGsdS)rN�)�self�ai�brr�D/opt/alt/python34/lib64/python3.4/idlelib/idle_test/test_calltips.py�__init__szTC.__init__z(self, ai=None, *b)cCsdS)rNr)rrrr�t1szTC.t1z(self)cCsdS)rNr)rrrrrr�t2szTC.t2z(self, ai, b=None)cGsdS)rNr)rr�argsrrr�t3szTC.t3z(self, ai, *args)cGsdS)rNr)rrrrr�t4szTC.t4z
(self, *args)cOsdS)rNr)rrrr�kwrrr�t5szTC.t5z(self, ai, b=None, *args, **kw)cCsdS)rNr)�norrrr�t6szTC.t6z
(no, self)cCsdS)rNr)r�cirrr�__call__szTC.__call__z
(self, ci)cCsdS)rNr)�cls�arrr�cmszTC.cmcCsdS)rNr)rrrr�smszTC.sm)�__name__�
__module__�__qualname__�__doc__�tipr	r
rr
rrrr�classmethodr�staticmethodrrrrrr	s(								rc@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZdS)�Get_signatureTestcs�Gdd�dt�}Gdd�d�}�fdd�}|jdk	r]|||j�n|tjd�|tjd�d	}|tj|�|gj|�||j|�|tjd
�||�t�dS)Nc@seZdZdZdS)z-Get_signatureTest.test_builtins.<locals>.Listz
List() docN)rrrrrrrr�List0sr!c@seZdZdZdS)z+Get_signatureTest.test_builtins.<locals>.SBN)rrrrrrrr�SB2sr"cs�jt|�|�dS)N)�assertEqual�	signature)�obj�out)rrr�gtest4sz.Get_signatureTest.test_builtins.<locals>.gtestzGCreate and return a new object.  See help(type) for accurate signature.z>Initialize self.  See help(type(self)) for accurate signature.z0L.append(object) -> None -- append object to endzmethod(function, instance))�listr�__new__r	�append�types�
MethodType�default_tip)rr!r"r'Z
append_docr)rr�
test_builtins-s		zGet_signatureTest.test_builtinscCs2tjjdk	r.|jttj�d�ndS)Nz�(width=70, initial_indent='', subsequent_indent='', expand_tabs=True,
    replace_whitespace=True, fix_sentence_endings=False, break_long_words=True,
    drop_whitespace=True, break_on_hyphens=True, tabsize=8, *, max_lines=None,
    placeholder=' [...]'))�textwrapZTextWrapperrr#r$)rrrr�test_signature_wrapEsz%Get_signatureTest.test_signature_wrapcCsFdd�}dd|_|jt|�ddtjdd�dS)NcSsdS)Nrrrrr�fNsz4Get_signatureTest.test_docline_truncation.<locals>.fri,z()
�z...)rr#r$�ctZ	_MAX_COLS)rr1rrr�test_docline_truncationMs
z)Get_signatureTest.test_docline_truncationcCsj|jtt�d�|jtt�d�dd�}dd|_|jt|�ddtj�dS)	NzUlist() -> new empty list
list(iterable) -> new list initialized from iterable's itemsz�bytes(iterable_of_ints) -> bytes
bytes(string, encoding[, errors]) -> bytes
bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer
bytes(int) -> bytes object of size given by the parameter initialized with null bytes
bytes() -> empty bytes objectcSsdS)Nrrrrrr1asz5Get_signatureTest.test_multiline_docstring.<locals>.fza
�z()z
a)r#r$r(�bytesrr3Z
_MAX_LINES)rr1rrr�test_multiline_docstringRs
z*Get_signatureTest.test_multiline_docstringcCs�dd�}d|_ddd�}d|_dd�}d	|_d
d�}d|_dd
d�}d|_|jdk	r�dnd}x=|||||tfD]#}|jt|�|j|�q�WdS)NcSsdS)rNrrrrrr
fsz,Get_signatureTest.test_functions.<locals>.t1z()cSsdS)rNr)rrrrrrhsz,Get_signatureTest.test_functions.<locals>.t2z(a, b=None)cWsdS)rNr)rrrrrr
jsz,Get_signatureTest.test_functions.<locals>.t3z
(a, *args)cWsdS)rNr)rrrrrlsz,Get_signatureTest.test_functions.<locals>.t4z(*args)c_sdS)rNr)rrrrrrrrnsz,Get_signatureTest.test_functions.<locals>.t5z(a, b=None, *args, **kw)z
doc�)rrrr#r$)rr
rr
rrr�funcrrr�test_functionses					z Get_signatureTest.test_functionscCs�tjdk	rdnd}xUtjtjtjtjtjtjtjfD]#}|j	t
|�|j|�qLW|j	t
tj�d|�|j	t
tj
�d|�dS)Nz
docr8z(a)z(b))rrr
rr
rrrrr#r$rrr)rr�methrrr�test_methodsus
7!zGet_signatureTest.test_methodscCs�tjdk	rdnd}xstjdftjdftjdftjdftdftjdffD]&\}}|jt	|�||�qgWdS)Nz
docr8z()z(*args)z(self)z(ci)z(a))
rr�tcr
rrrrr#r$)rrr;�mtiprrr�test_bound_methods|s'1z$Get_signatureTest.test_bound_methodscCs}Gdd�d�}|�}xZ|jdf|jdf|jdf|jdffD]"\}}|jt|�|�qSWdS)Nc@s(eZdZdd�Zdd�ZdS)z3Get_signatureTest.test_starred_parameter.<locals>.CcWsdS)Nr)rrrr�m1�sz6Get_signatureTest.test_starred_parameter.<locals>.C.m1c[sdS)Nr)�kwdsrrr�m2�sz6Get_signatureTest.test_starred_parameter.<locals>.C.m2N)rrrr@rBrrrr�C�srCz(*args)z(**kwds))r@rBr#r$)rrC�cr;r>rrr�test_starred_parameter�s
	(z(Get_signatureTest.test_starred_parametercCs
d}dS)Nu(AΑАאاअḀあ, a)r)rZunirrr�test_non_ascii_name�sz%Get_signatureTest.test_non_ascii_namecCsadd�}|t_|jt|�d�|jttj�d�|jttj�d�dS)NcSsdS)Nr)�srrr�nd�sz/Get_signatureTest.test_no_docstring.<locals>.ndz(s)z())rrHr#r$r=)rrHrrr�test_no_docstring�s
	z#Get_signatureTest.test_no_docstringcCs�Gdd�d�}Gdd�d|�}xT|tf|tf|�df|�dffD]"\}}|jt|�|�qZWdS)Nc@seZdZdd�ZdS)z:Get_signatureTest.test_attribute_exception.<locals>.NoCallcSs
t�dS)N)�
BaseException)r�namerrr�__getattr__�szFGet_signatureTest.test_attribute_exception.<locals>.NoCall.__getattr__N)rrrrLrrrr�NoCall�srMc@seZdZdd�ZdS)z8Get_signatureTest.test_attribute_exception.<locals>.CallcSsdS)Nr)rrrrrr�szAGet_signatureTest.test_attribute_exception.<locals>.Call.__call__N)rrrrrrrr�Call�srNr8z(ci))r-r#r$)rrMrNr;r>rrr�test_attribute_exception�s
(z*Get_signatureTest.test_attribute_exceptioncCs=x6ddddgifD]}|jt|�d�qWdS)Nrg�0�0r8)r#r$)rr%rrr�test_non_callables�sz$Get_signatureTest.test_non_callablesN)rrrr.r0r4r7r:r<r?rErFrIrOrRrrrrr %s
r c@s(eZdZdd�Zdd�ZdS)�Get_entityTestcCs|jtjd��dS)Nz1/0)ZassertIsNoner3�
get_entity)rrrr�test_bad_entity�szGet_entityTest.test_bad_entitycCs|jtjd�t�dS)N�int)ZassertIsr3rTrV)rrrr�test_good_entity�szGet_entityTest.test_good_entityN)rrrrUrWrrrrrS�srS�__main__�	verbosity��exitF)ZunittestZidlelib.CallTipsZCallTipsr3r/r+Z_default_callable_argspecr-rr=Zget_argspecr$ZTestCaser rSr�mainrrrr�<module>s			�

?>