
    BTh`(              	      T   U d Z ddlmZ ddlmZ ddlZddlZddlZddlmZ ddlm	Z	 ddl
Z
ddlmZ ddlZddlmZ dd	lmZ dd
lmZ ddlZej&                  j(                  Zd,dZ G d dej.                        Zej2                  Zded<   d-dZd-dZd.d/dZd0dZddd	 	 	 	 	 	 	 d1dZ d2dZ! e"d      D  ci c]  } |  e"dd      vs| d| d c} Z#e#jI                   e%d      d e%d      d  e%d!      d"i       d3d#Z&d$ Z'd% Z(d4d&Z)d5d'Z*d6d(Z+d7d)Z, G d* d+      Z-yc c} w )8z"Python version compatibility code.    )annotations)CallableN)	Parameter)	signature)Path)Any)Final)NoReturnc                    t        |       S )zBInternal wrapper to prepare lazy proxies for legacy_path instances)LEGACY_PATH)paths    `/var/www/catia.catastroantioquia-mas.com/valormas/lib/python3.12/site-packages/_pytest/compat.pylegacy_pathr      s    t    c                      e Zd ZdZy)
NotSetTyper   N)__name__
__module____qualname__token r   r   r   r   '   s    Er   r   r	   NOTSETc                J    t        j                  |       xs t        | dd      S )az  Return True if func is a coroutine function (a function defined with async
    def syntax, and doesn't contain yield), or a function decorated with
    @asyncio.coroutine.

    Note: copied and modified from Python 3.5's builtin coroutines.py to avoid
    importing asyncio directly, which in turns also initializes the "logging"
    module as a side-effect (see issue #8).
    _is_coroutineF)inspectiscoroutinefunctiongetattrfuncs    r   r   r   -   s#     &&t,Uou0UUr   c                F    t        |       xs t        j                  |       S )zZReturn True if the given function seems to be an async function or
    an async generator.)r   r   isasyncgenfunctionr   s    r   is_async_functionr"   9   s     t$H(B(B4(HHr   c                    t        |       } t        t        j                  |             }| j                  j
                  }|	 |j                  |      }| d|dz    S | d|dz    S # t        $ r Y w xY w)N:   )get_real_funcr   r   getfile__code__co_firstlinenorelative_to
ValueError)functioncurdirfnlinenorelfns        r   getlocationr1   ?   s    X&H	gooh'	(B--F	+NN6*E WAfqj\**T6A:,	  		s   A( (	A43A4c                v   t        | dd      }|syt        t        j                  j                  d      dt	                     }t        t        j                  j                  d      dt	                     }t        |D cg c],  }|j                  s|j                  |u s|j                  |u r|. c}      S c c}w )z>Return number of arguments used up by mock arguments (if any).	patchingsNr   mockDEFAULTzunittest.mock)r   sysmodulesgetobjectlenattribute_namenew)r,   r3   mock_sentinelut_mock_sentinelps        r   num_mock_patch_argsr@   M   s    +t4ICKKOOF3YIMs{{?FHU 	
##-'1554D+D 	
 	
s   >1B6 )nameclsc                  	 t        |       j                  j                         }t        d D              }|s| j                  }t        d	 |D              s-|r+t        t        j                  ||d
      t              s|dd }t        | d      r|t        |       d }|S # t        t        f$ r }ddlm}  |d| d| d       Y d}~d}~ww xY w)a   Return the names of a function's mandatory arguments.

    Should return the names of all function arguments that:
    * Aren't bound to an instance or type as in instance or class methods.
    * Don't have default values.
    * Aren't bound with functools.partial.
    * Aren't replaced with mocks.

    The cls arguments indicate that the function should be treated as a bound
    method even though it's not unless the function is a static method.

    The name parameter should be the original name in which the function was collected.
    r   )failz!Could not determine arguments of z: F)pytraceNc              3     K   | ]d  }|j                   t        j                  u s|j                   t        j                  u r*|j                  t        j
                  u r|j                   f y wNkindr   POSITIONAL_OR_KEYWORDKEYWORD_ONLYdefaultemptyrB   .0r?   s     r   	<genexpr>z"getfuncargnames.<locals>.<genexpr>   sP      FFi555vv///II( 	
s   A*A,c              3  T   K   | ]   }|j                   t        j                  u  " y wrH   )rJ   r   POSITIONAL_ONLYrO   s     r   rQ   z"getfuncargnames.<locals>.<genexpr>   s     Gqqvv222Gs   &()rM   r%   __wrapped__)r   
parametersvaluesr+   	TypeError_pytest.outcomesrE   tupler   any
isinstancer   getattr_staticstaticmethodhasattrr@   )r,   rB   rC   rU   erE   	arg_namess          r   getfuncargnamesra   `   s    8
x(33::<
   I   
 GJGG 	""3d;\
 abM	x'1(;=>	G 	" 
)/|2aSA	
 	

s   #B   C/C

Cc                h    t        d t        |       j                  j                         D              S )Nc              3     K   | ]X  }|j                   t        j                  t        j                  fv r*|j                  t        j
                  ur|j                   Z y wrH   rI   rO   s     r   rQ   z(get_default_arg_names.<locals>.<genexpr>   sI      66i55y7M7MNNIIY__, 	
s   AA )rY   r   rU   rV   )r,   s    r   get_default_arg_namesrd      s2      8$//668  r             z\x02x	z\tz\r
z\nc                    t        | t              r| j                  dd      }n | j                  d      j                  d      }|j	                  t
              S )a	  If val is pure ASCII, return it as an str, otherwise, escape
    bytes objects into a sequence of escaped bytes:

    b'\xc3\xb4\xc5\xd6' -> r'\xc3\xb4\xc5\xd6'

    and escapes strings into a sequence of escaped unicode ids, e.g.:

    r'4\nV\U00043efa\x0eMXWB\x1e\u3028\u15fd\xcd\U0007d944'

    Note:
       The obvious "v.decode('unicode-escape')" will return
       valid UTF-8 unicode if it finds them in bytes, but we
       want to return escaped bytes for any byte, even if they match
       a UTF-8 string.
    asciibackslashreplaceunicode_escape)r[   bytesdecodeencode	translate$_non_printable_ascii_translate_table)valrets     r   ascii_escapedrw      sI      #ujj"45jj)*11':===>>r   c                |    t        j                  |       } t        | t        j                        r| j
                  } | S )z{Get the real function object of the (possibly) wrapped object by
    :func:`functools.wraps`, or :func:`functools.partial`.)r   unwrapr[   	functoolspartialr   objs    r   r&   r&      s0     ..
C#y(()hhJr   c                >    	 | j                   S # t        $ r | cY S w xY wrH   )__func__AttributeErrorr   s    r   	getimfuncr      s%    }} s    c                D    ddl m} 	 t        | ||      S # |$ r |cY S w xY w)aR  Like getattr but return default upon any Exception or any OutcomeException.

    Attribute access can potentially fail for 'evil' Python objects.
    See issue #214.
    It catches OutcomeException because of #2490 (issue #580), new outcomes
    are derived from BaseException instead of Exception (for more details
    check #2707).
    r   )TEST_OUTCOME)rX   r   r   )r9   rB   rM   r   s       r   safe_getattrr      s/     .vtW-- s    c                L    	 t        j                  |       S # t        $ r Y yw xY w)z0Ignore any exception via isinstance on Python 3.F)r   isclass	Exceptionr|   s    r   safe_isclassr      s(    s## s    	##c                     t         j                  dk(  st         j                  dk(  ryd} t        j                         }|| k7  r|S dS )zReturn the current process's real user id or None if it could not be
    determined.

    :return: The user id or None if it could not be determined.
    win32
emscriptenN)r6   platformosgetuid)ERRORuids     r   get_user_idr      sC     ||w#,,,">  iikUls,,r   c                D    J d|  dt        |       j                   d       )NzUnhandled value: z ())typer   )values    r   assert_neverr   -  s'    F%eWBtE{/C/C.DAFF5r   c                  (    e Zd ZdZddZddZddZy)CallableBoola'  
    A bool-like object that can also be called, returning its true/false value.

    Used for backwards compatibility in cases where something was supposed to be a method
    but was implemented as a simple attribute by mistake (see `TerminalReporter.isatty`).

    Do not use in new code.
    c                    || _         y rH   _value)selfr   s     r   __init__zCallableBool.__init__;  s	    r   c                    | j                   S rH   r   r   s    r   __bool__zCallableBool.__bool__>      {{r   c                    | j                   S rH   r   r   s    r   __call__zCallableBool.__call__A  r   r   N)r   boolreturnNone)r   r   )r   r   r   __doc__r   r   r   r   r   r   r   r   1  s    r   r   )r   zstr | os.PathLike[str]r   r   )r   r9   r   r   rH   )r-   zstr | os.PathLike[str] | Noner   str)r   int)r,   zCallable[..., object]rB   r   rC   ztype | Noner   tuple[str, ...])r,   zCallable[..., Any]r   r   )ru   zbytes | strr   r   )r9   r   rB   r   rM   r   r   r   )r}   r9   r   r   )r   z
int | None)r   r
   r   r
   ).r   
__future__r   collections.abcr   enumrz   r   r   r   r   pathlibr   r6   typingr   r	   r
   pyr   localr   r   Enumr   r   r   __annotations__r   r"   r1   r@   ra   rd   rangert   updateordrw   r&   r   r   r   r   r   r   )is   0r   <module>r      sQ   ( " $      	  
    	 ggnn     	VI , 	A#A A 
	A
 AH	 $Cj(AU2s^,CAQsG}( $ % + +Ys4y%TE:
?."-hG C(s   :D%	D%