ok

Mini Shell

Direktori : /opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/
Upload File :
Current File : //opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/tstLastError.pyc

�
[��ec@s�ddlZddlZddlZddlZdejfd��YZedkr�e�Zej�ej�ej	�ej
�ndS(i����NtTestCasecBs>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cCs|j�|j�dS(N(ttest1ttest2(tself((sH/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/tstLastError.pytrunTest	s
cCstjd�dS(Ni(tlibxml2tdebugMemory(R((sH/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/tstLastError.pytsetUp
scCsHtj�tjd�dkr?|jdtjd�f�ndGHdS(NiisMemory leak %d bytestOK(Rt
cleanupParserRtfail(R((sH/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/tstLastError.pyttearDowns
 c
Cs�d�}
tj|
d�y||�Wn�|k
r�tj�}|dkr_|jd�n|j||j��|j||j��|j||j��|j||j	��|j||j
��|j|	|j��nX|jd|�dS(s�Run function f, with arguments args and expect an exception exc;
        when the exception is raised, check the libxml2.lastError for
        expected values.cSsdS(N((tctxtstr((sH/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/tstLastError.pytnoerrsslastError not sets$exception %s should have been raisedN(RtregisterErrorHandlertNonet	lastErrorR
tassertEqualtdomaintcodetmessagetleveltfiletline(RtftargstexcRRRRRRRte((sH/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/tstLastError.pytfailUnlessXmlErrors	
	cCsJ|jtjdtjdtjdtjdddtjdd
d	d�d
S(s-Test readFile with a file that does not exists	dummy.xmliRRRs+failed to load external entity "dummy.xml"
RRRN(s	dummy.xmlNi(RRtreadFileRt	treeErrortXML_FROM_IOtXML_IO_LOAD_ERRORtXML_ERR_WARNING(R((sH/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/tstLastError.pyR7s				cCsed}|jtj|t|�dddftjdtjdtjdddtjd	dd
d�dS(
s8Test a well-formedness error: we get the last error onlys<x>
<a>
</x>s	dummy.xmliRRRs0Opening and ending tag mismatch: a line 2 and x
RRRiN(	RRt
readMemorytlenRRtXML_FROM_PARSERtXML_ERR_TAG_NAME_MISMATCHt
XML_ERR_FATAL(Rts((sH/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/tstLastError.pyRCs				(t__name__t
__module__RRRRRR(((sH/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/tstLastError.pyRs				 	t__main__(tsystunittestt
setup_testRRR)ttestRRRR(((sH/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/tstLastError.pyt<module>sI	




Zerion Mini Shell 1.0