Your IP : 216.73.216.196


Current Path : /opt/alt/python27/lib/python2.7/site-packages/_pytest/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/_pytest/warnings.pyo

�
�mYc@`s�ddlmZmZmZddlZddlmZddlZd�Zd�Z	ed��Z
ejde�d��Z
dS(	i(tabsolute_importtdivisiontprint_functionN(tcontextmanagerc	C`s-|jd�}t|�dkr:|jd|f��nx#t|�dkr_|jd�q=Wg|D]}|j�^qg\}}}}}|j|�}|j|�}|r
y%t|�}|dkr�t�nWqtt	fk
r|jd|f��qXnd}|j
|||||�dS(sP
    Copy of the warning._setoption function but does not escape arguments.
    t:istoo many fields (max 5): %rtisinvalid lineno %rN(tsplittlent_OptionErrortappendtstript
_getactiont_getcategorytintt
ValueErrort
OverflowErrortfilterwarnings(	twmodtargtpartststactiontmessagetcategorytmoduletlineno((sA/opt/alt/python27/lib/python2.7/site-packages/_pytest/warnings.pyt
_setoption	s$+
cC`sH|jd�}|jdddddd�|jdd	d
dd�dS(Nspytest-warningss-Ws--pythonwarningsRR	thelps=set which warnings to report, see -W option of python itself.Rttypetlinelists�Each line specifies warning filter pattern which would be passedto warnings.filterwarnings. Process after -W and --pythonwarnings.(tgetgroupt	addoptiontaddini(tparsertgroup((sA/opt/alt/python27/lib/python2.7/site-packages/_pytest/warnings.pytpytest_addoption"scc`s�|jjd�pg}|jjd�}tjdt���}tjd�x|D]}tj|�qSWx|D]}tt|�qqWdVxH|D]@}tj|j	|j
|j|j|j
�}|jd|�q�WWdQXdS(s�
    catches the warnings generated during setup/call/teardown execution
    of the given item and after it is done posts them as warnings to this
    item.
    tpythonwarningsRtrecordtonceNtunused(tconfigt	getoptiontgetinitwarningstcatch_warningstTruetsimplefilterRt
formatwarningRRtfilenameRtlinetwarn(titemtargst
inifilterstlogRtwarningtmsg((sA/opt/alt/python27/lib/python2.7/site-packages/_pytest/warnings.pytcatch_warnings_for_item,s



thookwrappercc`st|��
dVWdQXdS(N(R9(R3((sA/opt/alt/python27/lib/python2.7/site-packages/_pytest/warnings.pytpytest_runtest_protocolFs
(t
__future__RRRR+t
contextlibRtpytestRR#R9thookimplR-R;(((sA/opt/alt/python27/lib/python2.7/site-packages/_pytest/warnings.pyt<module>s