'L iZddlmZddlmZddlZddlZddlmZddlm Z ddl m Z ddl m Z ddlZe eZe eZddZdd Zdd Zdd Zdd Zdd Zej0ddddZej0dddZej0dddZy)) annotations) GeneratorN)Config)Parser)Item)StashKeyc^d}d}|jd|d|jd|dd y) NzUDump the traceback of all threads if a test takes more than TIMEOUT seconds to finishzVExit the test process if a test takes more than faulthandler_timeout seconds to finishfaulthandler_timeout)defaultfaulthandler_exit_on_timeoutboolF)typer )addini)parser help_timeouthelp_exit_on_timeouts Z/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/_pytest/faulthandler.pypytest_addoptionrsG .  1 MM(,MD MM&(<6SXcddl}t}|jr||jt<t j ||jt<|j|jty)Nr)file) faulthandlerget_stderr_fileno is_enabledstash$fault_handler_original_stderr_fd_keyosdupfault_handler_stderr_fd_keyenable)configr stderr_filenos rpytest_configurer$!s]&'M =J 9:02}0EFLL,-V\\*EFGrcJddl}|jt|jvr7t j |jt|jt=t |jvr4|j|jt |jt =yy)Nr)rdisabler rrcloserr!)r"rs rpytest_unconfigurer(0sv"fll2 9:; LL4 5+v||;FLL)MNO LL= >si '""$ R< " " J ''~~)))~~$$&& 's.1?A32A3c>t|jdxsdS)Nr r )floatgetini)r"s rget_timeout_config_valuer4Ns 56=# >>rcL|jd}t|tsJ|S)Nr )r3 isinstancer)r"exit_on_timeouts r get_exit_on_timeout_config_valuer8Rs'mm$BCO ot ,, , rT)wrappertrylastc#.Kt|j}t|j}|dkDrJddl}|jjt }|j ||| d|jSdS#|jwxYww)Nr)rexit)r4r"r8rrr dump_traceback_latercancel_dump_traceback_later)itemtimeoutr7rr,s rpytest_runtest_protocolrAXs~&t{{3G6t{{CO{""#>?))'_)U 7  4 4 6  4 4 6sA%B(B+BBB)tryfirstc,ddl}|jy)z@Cancel any traceback dumping due to timeout before entering pdb.rNrr>rs rpytest_enter_pdbrFis,,.rc,ddl}|jy)zNCancel any traceback dumping due to an interactive exception being raised.rNrDrEs rpytest_exception_interactrHqs,,.r)rrreturnNone)r"rrIrJ)rIint)r"rrIr2)r"rrIr)r?rrIzGenerator[None, object, object])rIrJ) __future__rcollections.abcrrr+_pytest.configr_pytest.config.argparsingr _pytest.nodesr _pytest.stashrpytestrKrr rr$r(rr4r8hookimplrArFrHrrrUs"% !," (5x}$+hsmo  H ? ' ? t, -  $/ /$/ /r