bg ddlZddlZddlmZddlmZddlmZddlmZddlZddl m Z ddl m Z ddl m Z dd l mZdd lmZdd lmZerdd lmZd e ddfdZed e dddeededfdZdejdefdZejdddededfdZejdddededfdZejddededfdZejddededfdZejdd d!dedfd"ZdS)#N)contextmanager) Generator)Optional) TYPE_CHECKING)apply_warning_filters)Config)parse_warning_filter)Session)Item)TerminalReporter)Literalconfigreturnc2|dddS)Nmarkerszfilterwarnings(warning): add a warning filter to the given test. see https://docs.pytest.org/en/stable/how-to/capture-warnings.html#pytest-mark-filterwarnings )addinivalue_line)rs a/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/_pytest/warnings.pypytest_configurers-  iwhenz'Literal['config', 'collect', 'runtest']item)NNNc #^K|d}|jjpg}tjd5}|Jt js6tjdttjdtt|||dn|j }|@| dD])}|j D]} tjt| d  *dV|D].} |jt#| ||d  / ddddS#1swxYwYdS) zContext manager that catches warnings generated in the contained execution block. ``item`` can be None if we are not in the context of an item execution. Each warning captured triggers the ``pytest_warning_recorded`` hook. filterwarningsT)recordNalways)category)nameF)escape)warning_messagenodeidrlocation)kwargs)getiniknown_args_namespacepythonwarningswarningscatch_warningssys warnoptionsrDeprecationWarningPendingDeprecationWarningrr! iter_markersargsr pytest_warning_recorded call_historicdict) rihookrrconfig_filterscmdline_filterslogr!markargr s rcatch_warnings_for_itemr8s]]#344N1@FBO   - - - R  #H7I J J J J  #H7P Q Q Q Qno>>>|  ))/?)@@ V V9VVC+-A#e-T-T-TUUUV "  O  ) 7 7$3!!  8     )sCD""D&)D&r cx|j}tjt||j|j|j|j}|jr ddl }| |j}|0d | }|d|z }n!d}|dz }|d|dz }n#t$rYnwxYw|S) z.Convert a warnings.WarningMessage to a string.Nr z Object allocated at: zPhttps://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warningszDEnable tracemalloc to get traceback where the object was allocated. zSee z for more info.)messager' formatwarningstrrfilenamelinenolinesource tracemallocget_object_tracebackjoinformat ImportError)r warn_msgmsgrBtb formatted_tburls rwarning_record_to_strrLJs&H   H      C) 3    11/2HIIB~#yy55 @,@@@i^^2c2222    D  Js B** B76B7T) hookwrappertryfirstc#~Kt|j|jd|5dVddddS#1swxYwYdS)Nruntestrr2rr)r8rr2)rs rpytest_runtest_protocolrRhs {$*94    s 266sessionc#K|j}t||jdd5dVddddS#1swxYwYdS)NcollectrQrr8hookrSrs rpytest_collectionrYps ^F V[yt     488)rMterminalreporterc#K|j}t||jdd5dVddddS#1swxYwYdSNrrQrV)r[rs rpytest_terminal_summaryr^ys $F V[xd    rZc#K|j}t||jdd5dVddddS#1swxYwYdSr]rVrXs rpytest_sessionfinishr`s ^F V[xd    rZ early_configrc#tKt||jdd5dVddddS#1swxYwYdSr])r8rW)ras rpytest_load_initial_conftestsrcs !<#48$    s -11) r)r' contextlibrtypingrrrpytest_pytest.configrrr _pytest.mainr _pytest.nodesr _pytest.terminalr typing_extensionsr rr8WarningMessager=rLhookimplrRrYr^r`rcrrros %%%%%% 000000!!!!!!////// ------*))))))V* * 4* 4. *  ****Z8+Bs<TD111$95E+F21TD111w95E+F21T"""& #"T"""'i8H.I#"T""" #"r