'L i>zdZddlmZddlmZddlmZddlmZdZ e dzZ dZ dd Z dd Z dd Zdd Zy )zUtilities for truncating assertion output. Current default behaviour is to truncate assertion explanations at terminal lines, unless running with an assertions verbosity level of at least 2 or running on CI. ) annotations) running_on_ci)Config)ItemPzuse '-vv' to showcDt|\}}}|rt|||S|S)zGTruncate this assertion explanation if the given test item is eligible.) max_lines max_chars)_get_truncation_parameters_truncate_explanation) explanationitemshould_truncater r s `/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/_pytest/assertion/truncate.pytruncate_if_requiredrs4,Ft,L)OY $   cZ|jjd}t||nt}|jjd}t||nt}|jj t j}|dkxr t }|xr |dkDxs|dkD}|||fS)zgReturn the truncation parameters related to the given item, as (should truncate, max lines, max chars).truncation_limit_linestruncation_limit_charsr) configgetiniintDEFAULT_MAX_LINESDEFAULT_MAX_CHARS get_verbosityrVERBOSITY_ASSERTIONSr)rr r verbosers rr r s ""#;rBsn #(!%*   1*CCCC CLr