ӪIYA d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z dd lm Z dd lmZ ddlm Z ddlmZ dd lmZ ddlmZ ddlmZ erddlmZ deddfdZdeddfdZ G d d Z G d d Zdede j fdZd)dZ edd d!eded" fd# Zd)d$Z ded%ed&ed'edeee f d(Z!dS )*zBSupport for presenting detailed information in failing assertions. N)Any) Generator)List)Optional) TYPE_CHECKING)rewrite)truncate)util)assertstate_key)Config)hookimpl)Parser)Item)Sessionparserreturnc | d }| ddddddd | d ddd d S )Ndebugconfigz--assertstore assertmode)r plainr MODEzControl assertion debugging tools. 'plain' performs no assertion debugging. 'rewrite' (the default) rewrites assert statements in test modules on import to provide assert expression information.)actiondestchoicesdefaultmetavarhelpenable_assertion_pass_hookboolFzeEnables the pytest_assertion_pass hook. Make sure to delete any previously generated pyc cache files.)typer r )getgroup addoptionaddini)r groups l/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/_pytest/assertion/__init__.pypytest_addoptionr' s| OOM**E OO $ C MM$ H namesc & | D ]H}t |t s1d}t | t | It j D ] }t |t j r|} n!t } |j | dS )a Register one or more module names to be rewritten on import. This function will make sure that this module or all modules inside the package will get their assert statements rewritten. Thus you should make sure to call this before the module is actually imported, usually in your __init__.py if you are a plugin using a package. :param names: The module names to register. z/expected module names as *args, got {0} insteadN) isinstancestr TypeErrorformatreprsys meta_pathr AssertionRewritingHookDummyRewriteHookmark_rewrite)r) namemsghook importhooks r&