Your IP : 216.73.216.213


Current Path : /opt/alt/python34/lib64/python3.4/test/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/test/__pycache__/test_xml_etree_c.cpython-34.pyo

�
g f��@sOddlZddlZddlmZddlmZddlZddlZedddg�Zeddddg�Z	Gd	d
�d
ej
�Zejed�Gdd
�d
ej
��Z
ejed�ejGdd�dej
���Zejed�ejGdd�dej
���Zdd�ZedkrKe�ndS)�N)�support)�import_fresh_modulezxml.etree.ElementTreeZfresh�_elementtreezxml.etree.cElementTreez	xml.etreec@sMeZdZejdejddddd�dd��Zd	d
�ZdS)�	MiscTests�size�dZmemuse�Zdry_runFc
Cs>d|}tj�}z|jt|j|�Wdd}XdS)N�x)�cETZ	XMLParser�assertRaises�
OverflowErrorZfeed)�selfr�data�parser�r�:/opt/alt/python34/lib64/python3.4/test/test_xml_etree_c.py�test_length_overflows

zMiscTests.test_length_overflowc/Cs�tjd�}d|_|jt��|`WdQX|j|jd�|jt��|`WdQX|j|j�d|_|jt��|`WdQX|j|jd�|jt��|`WdQX|j|j�d|_|jt��|`WdQX|j|jd�|jt��|`	WdQX|j|j	i�idd6dd6|_	|jt��|`	WdQX|j|j	idd6dd6�dS)	N�tagZTAGZTEXTZTAIL�B�A�D�C)
r
�Elementrr�AttributeError�assertEqual�textZassertIsNone�tailZattrib)r
�elementrrr�test_del_attributes4			zMiscTests.test_del_attributeN)�__name__�
__module__�__qualname__rZ
bigmemtestZ_2Grrrrrrrs1	rzrequires _elementtreec@seZdZdd�ZdS)�TestAliasWorkingcCs&tjd�}|j|jd�dS)NZfoo)�	cET_aliasrrr)r
�errr�test_alias_working=sz#TestAliasWorking.test_alias_workingN)rr r!r%rrrrr":sr"c@s4eZdZdd�Zdd�Zdd�ZdS)�TestAcceleratorImportedcCs|jtjjd�dS)Nr)rr
�
SubElementr )r
rrr�test_correct_import_cETFsz/TestAcceleratorImported.test_correct_import_cETcCs|jtjjd�dS)Nr)rr#r'r )r
rrr�test_correct_import_cET_aliasJsz5TestAcceleratorImported.test_correct_import_cET_aliascCs|jtjjtj�dS)N)ZassertNotIsInstancer
r�__init__�types�FunctionType)r
rrr�test_parser_comes_from_CMsz0TestAcceleratorImported.test_parser_comes_from_CN)rr r!r(r)r-rrrrr&Bsr&c@sIeZdZdd�ZejZdd�Zdd�Zdd�Zd	S)
�
SizeofTestcCs(tjd�|_tjd�|_dS)NZ5PZPiiP4P)rZcalcobjsize�elementsize�struct�calcsize�extra)r
rrr�setUpWszSizeofTest.setUpcCs&tjd�}|j||j�dS)N�a)r
r�check_sizeofr/)r
r$rrr�test_element^szSizeofTest.test_elementcCs3tjddd�}|j||j|j�dS)Nr4Zhrefzabout:)r
rr5r/r2)r
r$rrr�test_element_with_attribbsz#SizeofTest.test_element_with_attribcCsatjd�}x$td�D]}tj|d�qW|j||j|jtjd��dS)Nr4��spanZ8P)	r
r�ranger'r5r/r2r0r1)r
r$�irrr�test_element_with_childrenfs
z%SizeofTest.test_element_with_childrenN)	rr r!r3rr5r6r7r<rrrrr.Ts
	r.cCs@ddlm}m}tjtttt�|j	dt
�dS)Nr)�test_xml_etree�test_xml_etree_c�module)�testr=r>rZrun_unittestrr"r&r.�	test_mainr
)r=r>rrrrAnsrA�__main__)�sysr0r@rZtest.supportrr+Zunittestr
r#ZTestCaserZ
skipUnlessr"Zcpython_onlyr&r.rArrrrr�<module>s(		,