
    	hhQ                     T   d dl Z d dlZd dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlm	Z	 d dlm
Z
 d d	lmZ d d
lmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dl m!Z! d dl"m#Z# d dl$m%Z% d d l&m'Z' d d!l&m(Z( d d"l)m*Z* erd d#l+m,Z, d d$l-m.Z. d% Z/ ed&d'(          Z0 G d) d'          Z1d*e2d+ee1         d,efd-Z3e# G d. d/e1                      Z4e# G d0 d1e1                      Z5 G d2 d3e          Z6d4ee5e4f         d,eee2ef                  fd5Z7d6ee2ef         d,eee5e4f                  fd7Z8d4e1d,ee2ef         fd8Z9d9ee2ef         d,ee2ef         fd:Z:dS );    N)StringIO)pprint)Any)cast)Dict)Iterable)Iterator)List)Mapping)NoReturn)Optional)Tuple)Type)TYPE_CHECKING)TypeVar)Union)ExceptionChainRepr)ExceptionInfo)ExceptionRepr)	ReprEntry)ReprEntryNative)ReprExceptionInfoReprFileLocation)ReprFuncArgs)
ReprLocalsReprTraceback)TerminalRepr)TerminalWriter)final)Config)	Collector)Item)skip)Literal)CallInfoc                     	 | j         S # t          $ rP | j        }d|d         d d         z  }d                    |d         |d         ||d                   x| _         }|cY S w xY w)Nz%s.%s.%sversion_info   z[{}] {} -- Python {} {}idsysplatform
executable)_workerinfocacheAttributeError
workerinfoformat)nodedverss       \/var/www/html/web-builder-api.evdpl.com/venv/lib/python3.11/site-packages/_pytest/reports.pygetworkerinfoliner7   ,   s    $$   O1^,RaR00$=$D$DdGQ}%sAlO%
 %
 	
 s   	 AA#"A#_R
BaseReport)boundc                      e Zd ZU ee         ed<   eeeee         ef                  ed<   ede	e
         eeeef         eef         ed<   eeeef                  ed<   eed<   ded<   d	ed
dfdZerded
efdZded
dfdZded
eeeef                  fdZed
efd            Zed
efd            Zed
efd            Zed
efd            Zed
efd            Zed
efd            Zed
efd            Zed
efd            Zed
efd            Zed
ee         fd            Z de!fdZ"d
e#eef         fdZ$e%de&e'         d e#ee(f         d
e'fd!            Z)dS )"r9   whenlocationNlongreprsectionsnodeid&Literal['passed', 'failed', 'skipped']outcomekwreturnc                 :    | j                             |           d S N)__dict__update)selfrC   s     r6   __init__zBaseReport.__init__E   s    R         keyc                     d S rF    )rI   rL   s     r6   __getattr__zBaseReport.__getattr__J   s    CrK   outc                 z   t          | d          r+t          | j                  }|r|                    |           | j        }|d S t          |d          r,t          t          |          }|                    |           d S 	 t          |          }n# t          $ r d}Y nw xY w|                    |           d S )Nr2   
toterminalz<unprintable longrepr>)
hasattrr7   r2   liner>   r   r   rR   strUnicodeEncodeError)rI   rP   worker_infor>   longrepr_terminalr5   s         r6   rR   zBaseReport.toterminalM   s    4   	&+DI66K &%%%=F8\** 	 $\8 < <((------MM% - - -,-HHQKKKKKs   B B#"B#prefixc              #   Z   K   | j         D ] \  }}|                    |          r||fV  !d S rF   )r?   
startswith)rI   rY   namecontents       r6   get_sectionszBaseReport.get_sectionsa   sJ      !] 	& 	&MD'v&& &go%%%	& 	&rK   c                     t                      }t          |          }d|_        |                     |           |                                }|                                S )zRead-only property that returns the full string representation of
        ``longrepr``.

        .. versionadded:: 3.0
        F)r   r    	hasmarkuprR   getvaluestrip)rI   filetwexcs       r6   longreprtextzBaseReport.longreprtextf   sN     zzD!!mmooyy{{rK   c                 f    d                     d |                     d          D                       S )z_Return captured log lines, if log capturing is enabled.

        .. versionadded:: 3.5
        
c              3       K   | ]	\  }}|V  
d S rF   rN   .0rY   r]   s      r6   	<genexpr>z$BaseReport.caplog.<locals>.<genexpr>z   s7       
 
)G
 
 
 
 
 
rK   zCaptured logjoinr^   rI   s    r6   caplogzBaseReport.caplogt   sD     yy 
 
-1->->~-N-N
 
 
 
 
 	
rK   c                 f    d                     d |                     d          D                       S )zbReturn captured text from stdout, if capturing is enabled.

        .. versionadded:: 3.0
         c              3       K   | ]	\  }}|V  
d S rF   rN   rj   s      r6   rl   z'BaseReport.capstdout.<locals>.<genexpr>   7       
 
)G
 
 
 
 
 
rK   zCaptured stdoutrm   ro   s    r6   	capstdoutzBaseReport.capstdout~   E     ww 
 
-1->->?P-Q-Q
 
 
 
 
 	
rK   c                 f    d                     d |                     d          D                       S )zbReturn captured text from stderr, if capturing is enabled.

        .. versionadded:: 3.0
        rr   c              3       K   | ]	\  }}|V  
d S rF   rN   rj   s      r6   rl   z'BaseReport.capstderr.<locals>.<genexpr>   rt   rK   zCaptured stderrrm   ro   s    r6   	capstderrzBaseReport.capstderr   rv   rK   c                     | j         dk    S )zWhether the outcome is passed.passedrB   ro   s    r6   r{   zBaseReport.passed        |x''rK   c                     | j         dk    S )zWhether the outcome is failed.failedr|   ro   s    r6   r   zBaseReport.failed   r}   rK   c                     | j         dk    S )zWhether the outcome is skipped.skippedr|   ro   s    r6   r   zBaseReport.skipped   s     |y((rK   c                 B    | j                             d          d         S )z3The path portion of the reported node, as a string.z::r   )r@   splitro   s    r6   fspathzBaseReport.fspath   s     {  &&q))rK   c                     dS )a6  **Experimental** Whether this report should be counted towards the
        totals shown at the end of the test session: "1 passed, 1 failure, etc".

        .. note::

            This function is considered **experimental**, so beware that it is subject to changes
            even in patch releases.
        TrN   ro   s    r6   count_towards_summaryz BaseReport.count_towards_summary   s	     trK   c                 .    | j         | j         \  }}}|S dS )a  **Experimental** The head line shown with longrepr output for this
        report, more commonly during traceback representation during
        failures::

            ________ Test.foo ________


        In the example above, the head_line is "Test.foo".

        .. note::

            This function is considered **experimental**, so beware that it is subject to changes
            even in patch releases.
        N)r=   )rI   r   linenodomains       r6   	head_linezBaseReport.head_line   s$      =$%)]"FFFMtrK   configc                 F    |j                             | |          \  }}}|S )N)reportr   )hookpytest_report_teststatus)rI   r   	_category_shortverboses        r6   _get_verbose_wordzBaseReport._get_verbose_word   s2    %+[%I%I &J &
 &
"	67 rK   c                      t          |           S )zReturn the contents of this report as a dict of builtin entries,
        suitable for serialization.

        This was originally the serialize_report() function from xdist (ca03269).

        Experimental method.
        )_report_to_jsonro   s    r6   _to_jsonzBaseReport._to_json   s     t$$$rK   cls
reportdictc                 0    t          |          } | di |S )a  Create either a TestReport or CollectReport, depending on the calling class.

        It is the callers responsibility to know which class to pass here.

        This was originally the serialize_report() function from xdist (ca03269).

        Experimental method.
        rN   )_report_kwargs_from_json)r   r   kwargss      r6   
_from_jsonzBaseReport._from_json   s#     **55s}}V}}rK   )*__name__
__module____qualname__r   rU   __annotations__r   intr   r   BaseExceptionr   r
   r   rJ   r   rO   r    rR   r	   r^   propertyrf   rp   ru   ry   boolr{   r   r   r   r   r   r"   r   r   r   classmethodr   r8   objectr   rN   rK   r6   r9   r9   ;   sU        
3-uS(3-456666mM*E#sC-,@#|S    5c?####KKK5555!S !T ! ! ! !  	3 	3 	 	 	 	n     (&3 &8E#s(O+D & & & &
 c    X 
 
 
 
 X
 
3 
 
 
 X
 
3 
 
 
 X
 ( ( ( ( X( ( ( ( ( X( ) ) ) ) X) * * * * X* 	t 	 	 	 X	 8C=    X(    %$sCx. % % % % 
R 
d3;.? 
B 
 
 
 [
 
 
rK   	type_namereport_classrD   c                 B   d}t                      }t          d|           t          d| z  |           t          d|z  |           t          ||           t          d|z  |           t          d|           t          |                                          )Nz+https://github.com/pytest-dev/pytest/issueszd----------------------------------------------------------------------------------------------------)streamz.INTERNALERROR: Unknown entry type returned: %szreport_name: %szPlease report this bug at %s)r   r   RuntimeErrorra   )r   r   r   urlr   s        r6   _report_unserialization_failurer      s     8CZZF
9V$$$$
;iGPVWWWW
|+F;;;;
:f%%%%
)C/????
9V$$$$
v((
)
))rK   c                   0   e Zd ZdZdZ	 	 	 	 	 ddedeeee         ef         de	ee
f         d	d
dedee         eeeef         eef         dddeeeef                  dedededeeeeef                           ddfdZdefdZededddd fd            ZdS )
TestReportzBasic test report object (also used for setup and teardown calls if
    they fail).

    Reports can contain arbitrary extra attributes.
    FrN   r   Nr@   r=   keywordsrB   rA   r>   r<   z$Literal['setup', 'call', 'teardown']r?   durationstartstopuser_propertiesrD   c                    || _         || _        || _        || _        || _        || _        t          |pg           | _        t          |          | _        || _	        |	| _
        |
| _        | j                            |           d S rF   )r@   r=   r   rB   r>   r<   listr   r?   r   r   r   rG   rH   )rI   r@   r=   r   rB   r>   r<   r?   r   r   r   r   extras                r6   rJ   zTestReport.__init__   s    $  9A ,4  ! 	  $O$9r:: X  ( "
	U#####rK   c                 d    d                     | j        j        | j        | j        | j                  S )Nz <{} {!r} when={!r} outcome={!r}>)r1   	__class__r   r@   r<   rB   ro   s    r6   __repr__zTestReport.__repr__9  s.    188N#T[$)T\
 
 	
rK   itemcallzCallInfo[None]c                 x   |j         }|dk    sJ |j        }|j        }|j        }d |j        D             }|j        }g }	|j        sd}
d}n t          |t                    sd}
|}nt          |j        t          j
                  rd}
|                                }|
J d            |j        j        rC|                                dd         \  }}|J t          j        |          |d	z   |j        f}nut#          |j                  |j        |j        f}nSd}
|j         d
k    r|                    |          }n0|                    ||j                            dd                    }|j        D ]#\  }}}|	                    d| d| |f           $ | |j        |j        ||
|||	||||j                  S )zCreate and fill a TestReport with standard item and call info.

        :param item: The item.
        :param call: The call info.
        collectc                     i | ]}|d S )   rN   )rk   xs     r6   
<dictcomp>z1TestReport.from_item_and_call.<locals>.<dictcomp>K  s    000QAq000rK   r{   Nr   r   z=There should always be a traceback entry for skipping a test.   r   r   tbstyleauto)stylez	Captured  )r   )r<   r   r   r   r   excinfo
isinstancer   valuer%   	Exception_getreprcrash_use_item_location
reportinfoosr   messagerU   pathr   repr_failure_repr_failure_pyr   	getoption_report_sectionsappendr@   r=   r   )r   r   r   r<   r   r   r   r   r   r?   rB   r>   rr   rT   rwhenrL   r]   s                     r6   from_item_and_callzTestReport.from_item_and_call>  s    yy    =
y00$-000,|  	>FG  H g}55 ""GM4>:: #))++MMR "MM=3 B!%!2!22A2!6JD$+++!yq!)CHH #AFQXqyAHH"9&&#0099HH#44t{'<'<Y'O'O  5    H $(#8 	B 	BE3OO666u66@AAAAsKM 0
 
 
 	
rK   )rN   r   r   r   N)r   r   r   __doc____test__rU   r   r   r   r   r   r   r   r   r   r   floatr   rJ   r   r   r$   r   rN   rK   r6   r   r      ss         H /1BF:$ :$:$ Xc]C/0:$ #s(#	:$
 ::$ -.c3m0Dc<W
:$ 5:$ 5c?+:$ :$ :$ :$ "(5f+=">?:$  
!:$ :$ :$ :$x
# 
 
 
 

 >
d >
2B >
| >
 >
 >
 [>
 >
 >
rK   r   c                      e Zd ZdZdZ	 ddedddedee         e	ee
ef         eef         d	eeeeef                           d
ee	eef                  ddfdZedee	eee
         ef                  fd            ZdefdZdS )CollectReportzSCollection report object.

    Reports can contain arbitrary extra attributes.
    r   rN   r@   rB   rA   r>   Nresultr?   rD   c                     || _         || _        || _        |pg | _        t	          |          | _        | j                            |           d S rF   )r@   rB   r>   r   r   r?   rG   rH   )rI   r@   rB   r>   r   r?   r   s          r6   rJ   zCollectReport.__init__  sU       ! l XU#####rK   c                      | j         d | j         fS rF   )r   ro   s    r6   r=   zCollectReport.location  s     T4;//rK   c                 h    d                     | j        t          | j                  | j                  S )Nz.<CollectReport {!r} lenresult={} outcome={!r}>)r1   r@   lenr   rB   ro   s    r6   r   zCollectReport.__repr__  s/    ?FFKT[))4<
 
 	
rK   )rN   )r   r   r   r   r<   rU   r   r   r   r   r   r   r   r
   r$   r#   r   rJ   r   r=   r   rN   rK   r6   r   r     s        
 D /1$ $$ :$ -.c3m0Dc<W
	$ eD)O456$ 5c?+$ 
$ $ $ $> 0	%Xc]C/0	10 0 0 X0

# 
 
 
 
 
 
rK   r   c                   .    e Zd ZdeddfdZdeddfdZdS )CollectErrorReprmsgrD   Nc                     || _         d S rF   )r>   )rI   r   s     r6   rJ   zCollectErrorRepr.__init__  s    rK   rP   c                 >    |                     | j        d           d S )NT)red)rT   r>   )rI   rP   s     r6   rR   zCollectErrorRepr.toterminal  s     D)))))rK   )r   r   r   rU   rJ   r    rR   rN   rK   r6   r   r     sX        C D    *n * * * * * * *rK   r   r   c                     t          | t          t          f          r%|                                 }| j        j        |d<   |S d S )N$report_type)r   r   r   r   r   r   )r   datas     r6   pytest_report_to_serializabler     sD     &:}566   %/8^4rK   r   c                     d| v ro| d         dk    rt                               |           S | d         dk    rt                              |           S J d                    | d                               d S )Nr   r   r   Fz(Unknown report_type unserialize data: {})r   r   r   r1   )r   s    r6   pytest_report_from_serializabler     s     <//((....!_44 ++D111	
@GG 
 
 	
 	
u 4rK   c                 4   dt           t          t          f         dt          t          t
          f         fddt          dt          t          t
          f         ffddt          t                   dt          t          t          t
          f                  fddt          dt          t          t
          f         ffd	}| j
                                        }t          | j        d
          rQt          | j        d          r$t          | j        d          r ||           |d<   n"t	          | j                  |d<   n
| j        |d<   |D ]K}t          ||         t          j                  rt          j        ||                   ||<   @|dk    rd||<   L|S )zReturn the contents of this report as a dict of builtin entries,
    suitable for serialization.

    This was originally the serialize_report() function from xdist (ca03269).
    entryrD   c                     t          j        |           }|                                D ],\  }}t          |d          rt          j        |          ||<   -t	          |           j        |d}|S )NrG   )typer   )dataclassesasdictitemsrS   r   r   )r   r   rL   r   
entry_datas        r6   serialize_repr_entryz-_report_to_json.<locals>.serialize_repr_entry  sr     !%((**,, 	6 	6JCuj)) 6'.u55S	"5kk2DAA
rK   reprtracebackc                 \    t          j        |           }fd| j        D             |d<   |S )Nc                 &    g | ]} |          S rN   rN   )rk   r   r   s     r6   
<listcomp>zE_report_to_json.<locals>.serialize_repr_traceback.<locals>.<listcomp>  s2     !
 !
 !
()  ##!
 !
 !
rK   reprentries)r   r   r   )r   r   r   s     r6   serialize_repr_tracebackz1_report_to_json.<locals>.serialize_repr_traceback  sJ    #M22!
 !
 !
 !
-:-F!
 !
 !
} rK   	reprcrashc                 2    | t          j        |           S d S rF   )r   r   )r   s    r6   serialize_repr_crashz-_report_to_json.<locals>.serialize_repr_crash  s       %i0004rK   repc                 X   | j         J t          t          | j                   } |j                   |j                  |j        d}t          |t                    rDg |d<   |j        D ]6\  }}}|d         	                     |           |          |f           7nd |d<   |S )N)r   r   r?   chain)
r>   r   r   r   r   r?   r   r   r  r   )r  r>   r   repr_traceback
repr_crashdescriptionr  r   s         r6   serialize_exception_longreprz5_report_to_json.<locals>.serialize_exception_longrepr  s    |'''s|44--h.@AA55h6LMM )"
 "

 h 233 	# F7O;C>  7
Kw&&00@@,,Z88#    #F7OrK   rR   r>   r   N)r   r   r   r   rU   r   r   r   r   r9   rG   copyrS   r>   r   r   PathLiker   )r   r  r3   r\   r  r   r   s       @@@r6   r   r     s   Y/0	c3h    $sCx.      ,-	$sCx.	!   * c3h       . 	Av-- (6?O44 	1O[:
 :
 	1 98@@AjMM00AjMM*  agr{++ 	i$((AdGGXAdGHrK   r   c                 "     fdfd}dt           t          t          t          f                  fd} d         rd d         v rd d         v r | d         d                   } | d         d                   } d         d         rQg } d         d         D ]0\  }}}|                     ||           ||          |f           1t          |          }	nt          ||	          }	 d         d
         D ]}
 |	j        |
  |	 d<    S )zReturn **kwargs that can be used to construct a TestReport or
    CollectReport instance.

    This was originally the serialize_report() function from xdist (ca03269).
    c                    | d         }| d         }|dk    r~d }d }d }|d         rt          di |d         }|d         rt          di |d         }|d         rt          |d         d                   }t          |d         ||||d         	          }n2|d
k    rt	          |d                   }nt          |t                     |S )Nr   r   r   reprfuncargsreprfileloc
reprlocalslinesr   )r  r  r  r  r   r   rN   )r   r   r   r   r   r   r   )r   r   
entry_typer  r  r  	reprentryr   s          r6   deserialize_repr_entryz8_report_kwargs_from_json.<locals>.deserialize_repr_entry%  s   &!'
$$LKJN# D+CCd>.BCCM" F.EEm1DEEL! E'\(:7(CDD
;D7m)%'7m< < <II ,,,'W66II+J
JOOOrK   c                 J    fd| d         D             | d<   t          di | S )Nc                 &    g | ]} |          S rN   rN   )rk   r   r  s     r6   r   zP_report_kwargs_from_json.<locals>.deserialize_repr_traceback.<locals>.<listcomp>A  s2     .
 .
 .
*+""1%%.
 .
 .
rK   r   rN   r   )repr_traceback_dictr  s    r6   deserialize_repr_tracebackz<_report_kwargs_from_json.<locals>.deserialize_repr_traceback@  sM    .
 .
 .
 .
/B=/Q.
 .
 .
M* 332333rK   repr_crash_dictc                 "    | t          di | S d S )NrN   r   )r  s    r6   deserialize_repr_crashz8_report_kwargs_from_json.<locals>.deserialize_repr_crashF  s!    &#66o6664rK   r>   r   r   r  )r   r   r?   )r   r   rU   r   r   r   r   
addsection)r   r  r  r   r   r  repr_traceback_datarepr_crash_datar  exception_infosectionr  s   `          @r6   r   r     s       64 4 4 4 4c3h0H     	: 0:j111z*55522z"?3
 
 +*:j+A++NOO	j!'* 	EEOFF 	 	A#_k 223FGG..??#    #5)) N /+#  N
 "*-j9 	0 	0G%N%w///!/
:rK   );r   r   ior   r   typingr   r   r   r   r	   r
   r   r   r   r   r   r   r   r   _pytest._code.coder   r   r   r   r   r   r   r   r   r   r   _pytest._ior    _pytest.compatr!   _pytest.configr"   _pytest.nodesr#   r$   _pytest.outcomesr%   typing_extensionsr&   _pytest.runnerr'   r7   r8   r9   rU   r   r   r   r   r   r   r   r   rN   rK   r6   <module>r*     s       				                                                                                                       1 1 1 1 1 1 , , , , , , , , , , , , ( ( ( ( ( ( . . . . . . 0 0 0 0 0 0 / / / / / / + + + + + + ) ) ) ) ) ) , , , , , , + + + + + + & & & & & &             ! ! ! ! ! ! # # # # # #       ! ! ! ! ! ! ())))))''''''	 	 	 WT&&&g g g g g g g gT**"&z"2** * * * I
 I
 I
 I
 I
 I
 I
 I
X 0
 0
 0
 0
 0
J 0
 0
 0
f* * * * *| * * *-+,d38n   
sCx.eM:-./   FJ F4S> F F F FRPc3h PDcN P P P P P PrK   