§
    øÛg¤Œ  ã                   óê  — d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlmZ ddlZddlmZ  eed¦  «        r ej        ¦   «         dz   Zn> ee
d¦  «        rdZne
j        d	k    rd
ZndZe
j        Ze›ded         ›ed         ›d�Z[[ddpdz   Zdez   ez   Ze
j        dd…         dk    o
e
j        dk     Ze
j        d         dk     Ze
j        dk    rej        Znd„ Z G d„ de¦  «        Zd„ Zd                      d¦  «        Z!d                      d¦  «        Z" ej#        d¦  «        Z$d Z%d!„ Z&d"„ Z'd#„ fd$„Z(dKd%„Z)d&„ Z*dd'l+m,Z- d(„ Z.d)„ Z/d*„ Z0d+„ Z1ej2        d,ej3        d-ej4        d.ej5        d/iZ6i ej7        d0“ej8        d1“ej9        d2“ej:        d3“ej;        d4“ej<        d5“ej=        d“ej>        d6“ej?        d7“ej@        d8“ejA        d9“ejB        d:“ejC        d;“ejD        d<“ejE        d=“ejF        d>“ejG        d?“ejH        d@ejI        dAejJ        dBejK        dCejL        dDi¥ZM	 dEeMejN        <   n# eO$ r Y nw xY w eedF¦  «        rejP        ZQndG„ ZQdH„ ZR G dI„ dJejS        ¦  «        ZTdS )Lz4Rewrite assertion AST to produce nice error messagesé    N)Úfnmatch)ÚutilÚget_tagz-PYTESTÚpypy_version_infoÚpypyÚjavaÚjythonÚcpythonú-é   ú.pyTÚcÚoú.é   )r   é   )é   r   r   ©r   é   c                 ó2   — t          j        | ||d d ¦  «        S ©N)ÚastÚCall)ÚaÚbr   s      úO/granary/edev/quantum/lib/python3.11/site-packages/_pytest/assertion/rewrite.pyú<lambda>r   +   s   € �SœX a¨¨A¨t°TÑ:Ô:€ ó    c                   ó`   — e Zd ZdZd„ Zd„ Zdd„Zd„ Zd„ Zd„ Z	d	„ Z
d
„ Zed„ ¦   «         Zd„ ZdS )ÚAssertionRewritingHookz*PEP302 Import hook which rewrites asserts.c                 ó²   — || _         |                     d¦  «        | _        d | _        i | _        |                      ¦   «          t          ¦   «         | _        d S )NÚpython_files)ÚconfigÚgetiniÚfnpatsÚsessionÚmodulesÚ_register_with_pkg_resourcesÚsetÚ_must_rewrite)Úselfr#   s     r   Ú__init__zAssertionRewritingHook.__init__1   sN   € ØˆŒØ—m’m NÑ3Ô3ˆŒØˆŒØˆŒØ×)Ò)Ñ+Ô+Ð+Ý ™UœUˆÔÐÐr   c                 ó   — || _         d S r   )r&   )r+   r&   s     r   Úset_sessionz"AssertionRewritingHook.set_session9   s   € ØˆŒˆˆr   Nc                 óf  — | j         j        }|                     d|z  ¦  «         |                     dd¦  «        }|d         }d }|�*t	          |¦  «        }t          |¦  «        dk    r|d         }|€¢	 t          j        ||¦  «        \  }}}	n# t          $ r Y d S w xY w|�| 	                    ¦   «          |	d         }
|
t          j
        k    r5t          t          d¦  «        rt          j        |¦  «        }nZ|d d…         }nO|
t          j        k    rd S n<t          j                             ||                     d¦  «        d         dz   ¦  «        }t$          j                             |¦  «        }|                      |||¦  «        sd S t*          j         }t          j                             |j        d	¦  «        }|r¸	 t          j        |¦  «         n¢# t2          $ r• t+          j        ¦   «         d         j        }|t6          j        k    rnc|t6          j        t6          j        fv rd
}nF|t6          j        t6          j         t6          j!        fv r |                     d|j        z  ¦  «         d
}n‚ Y nw xY w|j"        d d…         tF          z   }t          j                             ||¦  «        }tI          |||j        ¦  «        }|€I|                     d|›�¦  «         tK          | j         |¦  «        \  }}|€d S |rtM          ||||¦  «         n|                     d|›�¦  «         ||f| j'        |<   | S )Nzfind_module called for: %sr   r   éÿÿÿÿr   r   Úsource_from_cacher   Ú__pycache__Fzread only directory: %réýÿÿÿz
rewriting zfound cached rewritten pyc for )(r#   Ú_assertstateÚtraceÚrsplitÚlistÚlenÚimpÚfind_moduleÚImportErrorÚcloseÚPY_COMPILEDÚhasattrr1   Ú	PY_SOURCEÚosÚpathÚjoinÚ
rpartitionÚpyÚlocalÚ_should_rewriteÚsysÚdont_write_bytecodeÚdirnameÚmkdirÚOSErrorÚexc_infoÚerrnoÚEEXISTÚENOENTÚENOTDIRÚEACCESÚEROFSÚEPERMÚbasenameÚPYC_TAILÚ	_read_pycÚ_rewrite_testÚ_make_rewritten_pycr'   )r+   ÚnamerA   ÚstateÚnamesÚlastnameÚpthÚfdÚfnÚdescÚtpÚ	fn_pypathÚwriteÚ	cache_dirÚeÚ
cache_nameÚpycÚcoÚsource_stats                      r   r:   z"AssertionRewritingHook.find_module<   s3  € Ø”Ô(ˆØ�ŠÐ0°4Ñ7Ñ8Ô8Ð8Ø—’˜C Ñ#Ô#ˆØ˜”9ˆØˆØÐõ ˜‘:”:ˆDÝ�4‰yŒy˜AŠ~ˆ~Ø˜1”g�Øˆ;ðÝ"œ¨x¸Ñ>Ô>‘��B˜˜øÝð ð ð Ø�t�tðøøøàˆ~Ø—’‘
”
�
Ø�a”ˆBØ•S”_Ò$Ð$Ý�3Ð 3Ñ4Ô4ð !ÝÔ.¨rÑ2Ô2�B�Bà˜C˜R˜Cœ�B�BØ•s”}Ò$Ð$à�tð %õ ”—’˜c 4§?¢?°3Ñ#7Ô#7¸Ô#:¸UÑ#BÑCÔCˆBå”G—M’M "Ñ%Ô%ˆ	Ø×#Ò# D¨)°UÑ;Ô;ð 	Ø�4õ Ô+Ð+ˆÝ”G—L’L Ô!2°MÑBÔBˆ	Øð 	ðÝ”˜Ñ#Ô#Ð#Ð#øÝð ð ð Ý”L‘N”N 1Ô%Ô+�Ø�œÒ$Ð$ð Ø�5œ<­¬Ð7Ð7Ð7ð "�E�EØ�5œ<­¬µe´kÐBÐBÐBØ—K’KÐ 9¸IÔ<MÑ MÑNÔNÐNØ!�E�Eàøøðøøøð  Ô'¨¨¨Ô,­xÑ7ˆ
ÝŒg�lŠl˜9 jÑ1Ô1ˆõ �y # u¤{Ñ3Ô3ˆØˆ:Ø�KŠKˆK¨"¨"Ð.Ñ/Ô/Ð/Ý+¨D¬K¸ÑCÔC‰OˆK˜Øˆzà�tØð AÝ# E¨;¸¸RÑ@Ô@Ð@øà�KŠKˆK¸r¸rÐCÑDÔDÐDØ ˜WˆŒ�TÑØˆs%   Á4B Â
BÂBÆ>G ÇBI2É1I2c                 óÔ  — t          |¦  «        }|j        dk    r|                     d|›�¦  «         dS | j        �4| j                             |¦  «        r|                     d|›�¦  «         dS | j        D ]2}t          |j        |¦  «        r|                     d|›�¦  «          dS Œ3| j        D ]6}|                     |¦  «        r|                     d|›d|›d�¦  «          dS Œ7d	S )
Nzconftest.pyzrewriting conftest file: Tz.matched test file (was specified on cmdline): zmatched test file zmatched marked file z (from ú)F)	ÚstrrT   r5   r&   Ú
isinitpathr%   r   r*   Ú
startswith)r+   rY   rb   rZ   r_   ÚpatÚmarkeds          r   rF   z&AssertionRewritingHook._should_rewriteŽ   s+  € å�‰^Œ^ˆØÔ Ò.Ð.Ø�KŠKˆK¸¸Ð=Ñ>Ô>Ð>Ø�4àŒ<Ð#ØŒ|×&Ò& rÑ*Ô*ð Ø—’�Ø˜Rð"ñ #ô #ð #à�tð ”;ð 	ð 	ˆCõ
 �yÔ)¨3Ñ/Ô/ð Ø—’�°b°bÐ:Ñ;Ô;Ð;Ø�t�tðð Ô(ð 	ð 	ˆFØ�Š˜vÑ&Ô&ð Ø—’�À$À$À$ÈÈÈÐOÑPÔPÐPØ�t�tðð ˆur   c                 óÚ   — t          |¦  «                             t          t          j        ¦  «        ¦  «        }|r|                      |¦  «         | j                             |¦  «         dS )z Mark import names as needing to be re-written.

        The named module or package as well as any nested modules will
        be re-written on import.
        N)r)   ÚintersectionrG   r'   Ú_warn_already_importedr*   Úupdate)r+   r[   Úalready_importeds      r   Úmark_rewritez#AssertionRewritingHook.mark_rewrite­   sb   € õ ˜u™:œ:×2Ò2µ3µs´{Ñ3CÔ3CÑDÔDÐØð 	:Ø×'Ò'Ð(8Ñ9Ô9Ð9ØÔ×!Ò! %Ñ(Ô(Ð(Ð(Ð(r   c                 óh   — | j                              ddd                     |¦  «        z  ¦  «         d S )NÚP1z9Modules are already imported so can not be re-written: %sú,)r#   ÚwarnrB   )r+   r[   s     r   rs   z-AssertionRewritingHook._warn_already_imported¸   s>   € ØŒ×ÒØØGØ�HŠH�U‰OŒOññ	ô 	ð 	ð 	ð 	r   c                 óŽ  — |t           j        v rt           j        |         S | j                             |¦  «        \  }}t          j        |¦  «        x}t           j        |<   	 |j        |_        ||_        | |_        t          j
                             ||j        ¦  «         n#  t           j        |= ‚ xY wt           j        |         S r   )rG   r'   Úpopr9   Ú
new_moduleÚco_filenameÚ__file__Ú
__cached__Ú
__loader__rD   ÚbuiltinÚexec_Ú__dict__)r+   rY   rh   rg   Úmods        r   Úload_modulez"AssertionRewritingHook.load_module¾   s°   € ð •3”;ÐÐÝ”;˜tÔ$Ð$à”,×"Ò" 4Ñ(Ô(‰ˆˆCõ #&¤.°Ñ"6Ô"6Ð6ˆ�cŒk˜$Ñð	Øœ>ˆCŒLà ˆCŒNØ!ˆCŒNÝŒJ×Ò˜R ¤Ñ.Ô.Ð.Ð.øð	Ý”˜DÐ!ØøøøÝŒ{˜4Ô Ð s   Á"?B" Â"B2c                 ó´   — 	 t          j        |¦  «        \  }}}n# t          $ r Y dS w xY w|�|                     ¦   «          |d         }|t           j        k    S )NFr   )r9   r:   r;   r<   ÚPKG_DIRECTORY)r+   rY   r^   r_   r`   ra   s         r   Ú
is_packagez!AssertionRewritingHook.is_package×   si   € ð	Ýœ?¨4Ñ0Ô0‰LˆB��D�DøÝð 	ð 	ð 	Ø�5�5ð	øøøàˆ>Ø�HŠH‰JŒJˆJØ�!ŒWˆØ•SÔ&Ò&Ð&s   ‚ ›
)¨)c                 óx   — 	 ddl }|j         n# t          $ r Y dS w xY w|                     | |j        ¦  «         dS )z�
        Ensure package resources can be loaded from this loader. May be called
        multiple times, as the operation is idempotent.
        r   N)Úpkg_resourcesÚ__name__r;   Úregister_loader_typeÚDefaultProvider)Úclsr‹   s     r   r(   z3AssertionRewritingHook._register_with_pkg_resourcesá   sb   € ð	Ø Ð Ð Ð àÔ"Ð"Ð"øÝð 	ð 	ð 	ØˆFˆFð	øøøð
 	×*Ò*¨3°Ô0MÑNÔNÐNÐNÐNs   ‚ Ž
›c                 ó~   — t          |d¦  «        5 }|                     ¦   «         cddd¦  «         S # 1 swxY w Y   dS )z&Optional PEP302 get_data API.
        ÚrbN)ÚopenÚread)r+   ÚpathnameÚfs      r   Úget_datazAssertionRewritingHook.get_dataò   s€   € õ �(˜DÑ!Ô!ð 	 QØ—6’6‘8”8ð	ð 	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð 	ð 	s   ‘2²6¹6r   )rŒ   Ú
__module__Ú__qualname__Ú__doc__r,   r.   r:   rF   rv   rs   r†   r‰   Úclassmethodr(   r–   © r   r   r    r    .   sÉ   € € € € € Ø4Ð4ð#ð #ð #ðð ð ðPð Pð Pð Pðdð ð ð>	)ð 	)ð 	)ðð ð ð!ð !ð !ð2'ð 'ð 'ð ðOð Oñ „[ðOð ð ð ð ð r   r    c                 ó   — 	 t          |d¦  «        }nJ# t          $ r= t          j        ¦   «         d         j        }|                      d|›d|›�¦  «         Y dS w xY w	 |                     t          j        ¦   «         ¦  «         t          |j
        ¦  «        }|j        dz  }|                     t          j        d||¦  «        ¦  «         t          j        ||¦  «         |                     ¦   «          n# |                     ¦   «          w xY wdS )	NÚwbr   zerror writing pyc file at z: errno=Fl   ÿÿ ú<llT)r’   ÚIOErrorrG   rL   rM   r5   rc   r9   Ú	get_magicÚintÚmtimeÚsizeÚstructÚpackÚmarshalÚdumpr<   )rZ   rh   ri   rg   ÚfpÚerrr¢   r£   s           r   Ú
_write_pycrª   ù   sþ   € ðÝ�#�t‰_Œ_ˆˆøÝð ð ð ÝŒl‰nŒn˜QÔÔ%ˆØ�Šˆ¸s¸s¸sÀCÀCÐHÑIÔIÐIð ˆuˆuðøøøðØ
�Š•”‘”Ñ!Ô!Ð!Ý�KÔ%Ñ&Ô&ˆØÔ *Ñ,ˆØ
�Š•”˜U E¨4Ñ0Ô0Ñ1Ô1Ð1ÝŒ�R˜ÑÔÐà
�Š‰
Œ
ˆ
ˆ
øˆ�Š‰
Œ
ˆ
ˆ
øøøØˆ4s   ‚ “AAÁAÁBC5 Ã5Dz
zutf-8ú
z#^[ \t\f]*#.*coding[:=][ \t]*[-\w.]+u   Ã¯Â»Â¿c                 óÚ  — | j         }	 |                     ¦   «         }|                     d¦  «        }n# t          $ r Y dS w xY wt          rÞ|                     d¦  «        }|                     d|dz   ¦  «        }|                     t          ¦  «        s–t           	                    |d|…         ¦  «        €tt           	                    ||dz   |…         ¦  «        €Ot          |d¦  «        rdS d|_        	 	 |                     d	¦  «         n# t          $ r Y |`dS w xY w	 |`n# |`w xY wt          r(|                     t           t"          ¦  «        t"          z   }	 t%          j        |¦  «        }n)# t(          $ r |                     d
|›�¦  «         Y dS w xY wt-          ||| ¦  «         	 t/          ||j        d¦  «        }n)# t(          $ r |                     d|›�¦  «         Y dS w xY w||fS )z8Try to read and rewrite *fn* and return the code object.r‘   ©NNr«   r   r   NÚ	_indecodeTÚasciizfailed to parse: Úexeczfailed to compile: )r4   Ústatr“   ÚEnvironmentErrorÚASCII_IS_DEFAULT_ENCODINGÚfindrn   ÚBOM_UTF8Ú	cookie_reÚmatchr>   r®   ÚdecodeÚUnicodeDecodeErrorÚREWRITE_NEWLINESÚreplaceÚRNÚNr   ÚparseÚSyntaxErrorr5   Úrewrite_assertsÚcompileÚstrpath)	r#   r_   rZ   r±   ÚsourceÚend1Úend2Útreerh   s	            r   rW   rW     s<  € àÔ€EðØ�wŠw‰yŒyˆØ—’˜‘”ˆˆøÝð ð ð Øˆzˆzðøøøå ð $ð �{Š{˜4Ñ Ô ˆØ�{Š{˜4 ¨¡Ñ*Ô*ˆØ×!Ò!¥(Ñ+Ô+ð 	$Ý�OŠO˜F 1 T 6œNÑ+Ô+Ð3Ý�OŠO˜F 4¨!¡8¨D =Ô1Ñ2Ô2Ð:Ý�u˜kÑ*Ô*ð "à!�zØ"ˆEŒOð$ð&Ø—M’M 'Ñ*Ô*Ð*Ð*øÝ)ð &ð &ð &à%à�O�O�Oð	&øøøð +ð
 �O�Oø�E�OÐ#Ð#Ð#Ð#õ ð +Ø—’¥¥AÑ&Ô&­Ñ*ˆðÝŒy˜Ñ Ô ˆˆøÝð ð ð à�Šˆ¨R¨RÐ1Ñ2Ô2Ð2Øˆzˆzðøøøõ �D˜"˜fÑ%Ô%Ð%ðÝ�T˜2œ: vÑ.Ô.ˆˆøÝð ð ð ð 	�Šˆ¨r¨rÐ3Ñ4Ô4Ð4Øˆzˆzð	øøøð
 �ˆ8€Os]   ‰)3 ³
AÁ AÃ5D Ä
D" Ä
DÄD" ÄDÄD" Ä"D&ÅE. Å."FÆFÆ)G  Ç "G&Ç%G&c                 ó
  — t           j                             d¦  «        rt          | |||¦  «         dS |dz   t	          t          j        ¦   «         ¦  «        z   }t          | |||¦  «        rt          j        ||¦  «         dS dS )z$Try to dump rewritten code to *pyc*.Úwinr   N)rG   Úplatformrn   rª   rl   r@   ÚgetpidÚrename)rZ   ri   rg   rh   Úproc_pycs        r   rX   rX   Q  sŒ   € å
„|×Ò˜uÑ%Ô%ð 	%õ 	�5˜"˜k¨3Ñ/Ô/Ð/Ð/Ð/ð ˜‘9�s¥2¤9¡;¤;Ñ/Ô/Ñ/ˆÝ�e˜R ¨hÑ7Ô7ð 	%ÝŒI�h Ñ$Ô$Ð$Ð$Ð$ð	%ð 	%r   c                 ó   — d S r   r›   )Úxs    r   r   r   ^  s   € ¨4€ r   c                 óf  — 	 t          |d¦  «        }n# t          $ r Y dS w xY w|5  	 t          |                      ¦   «         ¦  «        }|                      ¦   «         }|                     d¦  «        }n4# t          $ r'} |d| ›d|›�¦  «         Y d}~ddd¦  «         dS d}~ww xY wt          |¦  «        dk    sB|dd…         t          j	        ¦   «         k    s#t          j        d|dd…         ¦  «        ||fk    r |d| z  ¦  «         	 ddd¦  «         dS 	 t          j        |¦  «        }n4# t          $ r'} |d| ›d	|›�¦  «         Y d}~ddd¦  «         dS d}~ww xY wt          |t           j        ¦  «        s |d
| z  ¦  «         	 ddd¦  «         dS |cddd¦  «         S # 1 swxY w Y   dS )zsPossibly read a pytest pyc containing rewritten code.

    Return rewritten code if successful or None if not.
    r‘   Né   z
_read_pyc(z): EnvironmentError é   rž   z)_read_pyc(%s): invalid or out of date pycz): marshal.load error z _read_pyc(%s): not a code object)r’   rŸ   r¡   r¢   r£   r“   r²   r8   r9   r    r¤   Úunpackr¦   ÚloadÚ	ExceptionÚ
isinstanceÚtypesÚCodeType)	rÃ   rg   r5   r¨   r¢   r£   Údatare   rh   s	            r   rV   rV   ^  s³  € ð
Ý�#�t‰_Œ_ˆˆøÝð ð ð Øˆtˆtðøøøà	ð ð ð	Ý˜Ÿš™œÑ'Ô'ˆEØ—;’;‘=”=ˆDØ—7’7˜2‘;”;ˆDˆDøÝð 	ð 	ð 	ØˆEˆE¸&¸&¸&À!À!ÐDÑEÔEÐEØ�4�4�4ðð ð ñ ô ð ð ð øøøøð
	øøøõ �‰IŒI˜ŠOˆO˜t B Q Bœx­3¬=©?¬?Ò:Ð:Ý”˜e T¨!¨"¨"¤XÑ.Ô.°5¸$°-Ò?Ð?ØˆEÐ=ÀÑFÑGÔGÐGØðð ð ñ ô ð ð ð ð	Ý”˜bÑ!Ô!ˆBˆBøÝð 	ð 	ð 	ØˆEˆE¸F¸F¸FÀAÀAÐFÑGÔGÐGØ�4�4�4ð#ð ð ñ ô ð ð ð øøøøð	øøøõ ˜"�eœnÑ-Ô-ð 	ØˆEÐ4°vÑ=Ñ>Ô>Ð>Øð)ð ð ñ ô ð ð ð ð* ð+ð ð ð ñ ô ð ð ð ð ð ð øøøð ð ð ð ð ð sx   ‚ “
! !¦F&¨A
A3Á2F&Á3
B$Á=BÂF&ÂB$Â$A'F&ÄD.Ä-F&Ä.
EÄ8EÅ	F&ÅEÅ,F&ÆF&Æ&F*Æ-F*c                 óL   — t          ||¦  «                             | ¦  «         dS )z%Rewrite the assert statements in mod.N)ÚAssertionRewriterÚrun)r…   Úmodule_pathr#   s      r   rÀ   rÀ     s&   € å�k 6Ñ*Ô*×.Ò.¨sÑ3Ô3Ð3Ð3Ð3r   c                 ó  — t           j                             | ¦  «        }t           j                             |¦  «        rt           j        j        }nt           j        j        }|                      |d¦  «         |d¦  «        ¦  «        S )a¦  Get a safe repr of an object for assertion error messages.

    The assertion formatting (util.format_explanation()) requires
    newlines to be escaped since they are a special character for it.
    Normally assertion.util.format_explanation() does this but for a
    custom repr it is possible to contain one of the special escape
    sequences, especially '
{' and '
}' are likely to be present in
    JSON reprs.

    r«   ú\n)rD   ÚioÚsafereprr‚   Ú_istextÚtextÚbytesr»   )ÚobjÚreprÚts      r   Ú	_safereprrç   „  sh   € õ Œ5�>Š>˜#ÑÔ€DÝ	„z×Ò˜$ÑÔð ÝŒJŒOˆˆåŒJÔˆØ�<Š<˜˜˜$™œ   5¡¤Ñ*Ô*Ð*r   )Úformat_explanationc                 óB  — t           j                             | ¦  «        st           j                             | ¦  «        r| }d}n!t           j                             | ¦  «        }d}t           j                             |¦  «        rt           j        j        }nt           j        j        }|                      |d¦  «         |d¦  «        ¦  «                              |d¦  «         |d¦  «        ¦  «        }|r(|                      |d¦  «         |d¦  «        ¦  «        }|S )z÷Format the custom assertion message given.

    For strings this simply replaces newlines with '
~' so that
    util.format_explanation() will preserve them instead of escaping
    newlines.  For other objects py.io.saferepr() is used first.

    FTr«   z
~ú%ú%%rÞ   )	rD   r‚   rá   Ú_isbytesrß   rà   râ   rã   r»   )rä   ÚsÚis_reprræ   s       r   Ú_format_assertmsgrï   ™  s÷   € õ 
„z×Ò˜#ÑÔð ¥"¤*×"5Ò"5°cÑ":Ô":ð ØˆØˆˆåŒE�NŠN˜3ÑÔˆØˆÝ	„z×Ò˜!ÑÔð ÝŒJŒOˆˆåŒJÔˆØ	�	Š	�!�!�D‘'”'˜1˜1˜U™8œ8Ñ$Ô$×,Ò,¨Q¨Q¨s©V¬V°Q°Q°t±W´WÑ=Ô=€AØð *Ø�IŠI�a�a˜‘h”h   %¡¤Ñ)Ô)ˆØ€Hr   c                 ód   — t          | d¦  «         ot          j                             | ¦  «         S )NrŒ   )r>   rD   r‚   Úcallable)rä   s    r   Ú_should_repr_global_namerò   ´  s-   € Ý�s˜JÑ'Ô'Ð'ÐHµ´
×0CÒ0CÀCÑ0HÔ0HÐ,HÐHr   c                 ó  — d|rdpd                      | ¦  «        z   dz   }t          j                             |¦  «        rt          j        j        }nt          j        j        }|                      |d¦  «         |d¦  «        ¦  «        S )Nú(z or z and rk   rê   rë   )rB   rD   r‚   rá   râ   rã   r»   )ÚexplanationsÚis_orÚexplanationræ   s       r   Ú_format_booloprø   ·  s|   € Ø˜Ð) 6Ð4¨W×:Ò:¸<ÑHÔHÑHÈ3ÑN€KÝ	„z×Ò˜+Ñ&Ô&ð ÝŒJŒOˆˆåŒJÔˆØ×Ò˜q˜q ™vœv q q¨¡w¤wÑ/Ô/Ð/r   c                 ó  — t          t          t          | ¦  «        ¦  «        ||¦  «        D ]!\  }}}	 | }n# t          $ r d}Y nw xY w|r nŒ"t          j        �/t	          j        | |         ||         ||dz            ¦  «        }|�|S |S )NTr   )ÚzipÚranger8   rÔ   r   Ú_reprcompare)	ÚopsÚresultsÚexplsÚeach_objÚiÚresÚexplÚdoneÚcustoms	            r   Ú_call_reprcomparer  ¿  s°   € Ý�E¥# c¡(¤(™OœO¨W°eÑ<Ô<ð ð ‰ˆˆ3�ð	Ø�7ˆDˆDøÝð 	ð 	ð 	ØˆDˆDˆDð	øøøàð 	ØˆEð	åÔÐ$ÝÔ" 3 q¤6¨8°A¬;¸ÀÀQÁ¼ÑHÔHˆØÐØˆMØ€Ks   ³7·AÁAznot %sz~%sz-%sz+%sú|ú^ú&z<<z>>ú+Ú*ú/z//rë   z==z!=ú<z<=ú>z>=ú**Úiszis notÚinznot inú@ÚNameConstantc                 óh   — t          j        t          | ¦  «        t          j        ¦   «         ¦  «        S r   )r   ÚNamerl   ÚLoad)r   s    r   Ú_NameConstantr  ÷  s    € ÝŒx�˜A™œ¥¤¡
¤
Ñ+Ô+Ð+r   c                 ó,   ‡— ˆfd„Š ‰| ||¦  «         | S )z*Set node location information recursively.c                 ó�   •— d| j         v r|| _        d| j         v r|| _        t          j        | ¦  «        D ]} ‰|||¦  «         Œd S )NÚlinenoÚ
col_offset)Ú_attributesr  r  r   Úiter_child_nodes)Únoder  r  ÚchildÚ_fixs       €r   r   zset_location.<locals>._fixý  sh   ø€ Ø�tÔ'Ð'Ð'Ø ˆDŒKØ˜4Ô+Ð+Ð+Ø(ˆDŒOÝÔ)¨$Ñ/Ô/ð 	,ð 	,ˆEØˆD�˜ 
Ñ+Ô+Ð+Ð+ð	,ð 	,r   r›   )r  r  r  r   s      @r   Úset_locationr!  û  s7   ø€ ð,ð ,ð ,ð ,ð ,ð 	€Dˆˆv�zÑ"Ô"Ð"Ø€Kr   c                   óº   ‡ — e Zd ZdZˆ fd„Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zej        dk    reZneZd„ Zd„ Zˆ xZS )rÚ   a2	  Assertion rewriting implementation.

    The main entrypoint is to call .run() with an ast.Module instance,
    this will then find all the assert statements and re-write them to
    provide intermediate values and a detailed assertion error.  See
    http://pybites.blogspot.be/2011/07/behind-scenes-of-pytests-new-assertion.html
    for an overview of how this works.

    The entry point here is .run() which will iterate over all the
    statements in an ast.Module and for each ast.Assert statement it
    finds call .visit() with it.  Then .visit_Assert() takes over and
    is responsible for creating new ast statements to replace the
    original assert statement: it re-writes the test of an assertion
    to provide intermediate values and replace it with an if statement
    which raises an assertion error with a detailed explanation in
    case the expression is false.

    For this .visit_Assert() uses the visitor pattern to visit all the
    AST nodes of the ast.Assert.test field, each visit call returning
    an AST node and the corresponding explanation string.  During this
    state is kept in several instance attributes:

    :statements: All the AST statements which will replace the assert
       statement.

    :variables: This is populated by .variable() with each variable
       used by the statements so that they can all be set to None at
       the end of the statements.

    :variable_counter: Counter to create new unique variables needed
       by statements.  Variables are created using .variable() and
       have the form of "@py_assert0".

    :on_failure: The AST statements which will be executed if the
       assertion test fails.  This is the code which will construct
       the failure message and raises the AssertionError.

    :explanation_specifiers: A dict filled by .explanation_param()
       with %-formatting placeholders and their corresponding
       expressions to use in the building of an assertion message.
       This is used by .pop_format_context() to build a message.

    :stack: A stack of the explanation_specifiers dicts maintained by
       .push_format_context() and .pop_format_context() which allows
       to build another %-formatted string while already building one.

    This state is reset on every new assert statement visited and used
    by the other visitors.

    c                 ór   •— t          t          | ¦  «                             ¦   «          || _        || _        d S r   )ÚsuperrÚ   r,   rÜ   r#   )r+   rÜ   r#   Ú	__class__s      €r   r,   zAssertionRewriter.__init__<  s3   ø€ ÝÕ Ñ&Ô&×/Ò/Ñ1Ô1Ð1Ø&ˆÔØˆŒˆˆr   c                 óÄ  ‡— |j         sdS t          j        t          j        j        j        d¦  «        t          j        dd¦  «        g}d}d}dŠ|j         D ]¦}|rdt          |t          j        ¦  «        rJt          |j	        t          j
        ¦  «        r+|j	        j        }d|v r dS ‰t          |¦  «        dz
  z  Šd	}n9t          |t          j        ¦  «        r|j        dk    s|j        d
k    r	|j        Š n|dz  }Œ§ˆfd„|D ¦   «         }||j         ||…<   |g}|�rC|                     ¦   «         }	t          j        |	¦  «        D �]\  }
}t          |t&          ¦  «        r°g }t)          |¦  «        D ]Œ\  }}t          |t          j        ¦  «        r)|                     |                      |¦  «        ¦  «         ŒH|                     |¦  «         t          |t          j        ¦  «        r|                     |¦  «         Œ�t5          |	|
|¦  «         ŒËt          |t          j        ¦  «        r/t          |t          j        ¦  «        s|                     |¦  «         �Œ|�°AdS dS )z5Find all assert statements in *mod* and rewrite them.Nú@py_builtinsz_pytest.assertion.rewriteú
@pytest_arTr   ÚPYTEST_DONT_REWRITEr   FÚ
__future__c                 ó@   •— g | ]}t          j        |g‰d ¬¦  «        ‘ŒS )r   )r  r  )r   ÚImport)Ú.0Úaliasr  s     €r   ú
<listcomp>z)AssertionRewriter.run.<locals>.<listcomp>[  s<   ø€ ð )ð )ð )Øõ ”:˜u˜g¨fÀÐCÑCÔCð )ð )ð )r   )Úbodyr   r.  rD   r‚   ÚbuiltinsrŒ   rÕ   ÚExprÚvalueÚStrrí   r8   Ú
ImportFromÚlevelÚmoduler  r|   Úiter_fieldsr7   Ú	enumerateÚAssertÚextendÚvisitÚappendÚASTÚsetattrÚexpr)r+   r…   ÚaliasesÚexpect_docstringÚposÚitemÚdocÚimportsÚnodesr  rY   ÚfieldÚnewr  r  r  s                  @r   rÛ   zAssertionRewriter.runA  s’  ø€ àŒxð 	àˆFõ ”9�RœZÔ0Ô9¸>ÑJÔJÝ”9Ð8¸,ÑGÔGðIˆàÐØˆØˆØ”Hð 	ð 	ˆDØ ð ¥Z°µc´hÑ%?Ô%?ð Ý˜tœz­3¬7Ñ3Ô3ðà”j”l�Ø(¨CÐ/Ð/à�F�FØ�#˜c™(œ( Q™,Ñ&�Ø#(Ð Ð Ý  ¥s¤~Ñ6Ô6ð ¸$¼*Àqº.¸.Ø”+ Ò-Ð-Øœ�Ø�Ø�1‰HˆCˆCð)ð )ð )ð )Ø 'ð)ñ )ô )ˆà#ˆŒ��S�Ñà�ˆØñ 	(Ø—9’9‘;”;ˆDÝ"œ¨tÑ4Ô4ð (ñ (‘��eÝ˜e¥TÑ*Ô*ð (Ø�CÝ$-¨eÑ$4Ô$4ð 4ð 4™˜˜5Ý% e­S¬ZÑ8Ô8ð 4àŸJšJ t§z¢z°%Ñ'8Ô'8Ñ9Ô9Ð9Ð9àŸJšJ uÑ-Ô-Ð-Ý)¨%µ´Ñ9Ô9ð 4Ø %§¢¨UÑ 3Ô 3Ð 3øÝ˜D $¨Ñ,Ô,Ð,Ð,Ý  ­¬Ñ0Ô0ð (õ % U­C¬HÑ5Ô5ð(ð —L’L Ñ'Ô'Ð'ùð% ñ 	(ð 	(ð 	(ð 	(ð 	(r   c                 ó‚   — dt          t          | j        ¦  «        ¦  «        z   }| j                             |¦  «         |S )zGet a new variable.z
@py_assert)rl   ÚnextÚvariable_counterÚ	variablesr=  )r+   rY   s     r   ÚvariablezAssertionRewriter.variablet  s<   € ð �c¥$ tÔ'<Ñ"=Ô"=Ñ>Ô>Ñ>ˆØŒ×Ò˜dÑ#Ô#Ð#Øˆr   c           	      ó  — |                       ¦   «         }| j                             t          j        t          j        |t          j        ¦   «         ¦  «        g|¦  «        ¦  «         t          j        |t          j        ¦   «         ¦  «        S )zGive *expr* a name.)rN  Ú
statementsr=  r   ÚAssignr  ÚStorer  )r+   r@  rY   s      r   ÚassignzAssertionRewriter.assign{  s^   € à�}Š}‰ŒˆØŒ×Ò�sœz­3¬8°D½#¼)¹+¼+Ñ+FÔ+FÐ*GÈÑNÔNÑOÔOÐOÝŒx˜�cœh™jœjÑ)Ô)Ð)r   c                 ó.   — |                       d|¦  «        S )z&Call py.io.saferepr on the expression.rà   )Úhelper)r+   r@  s     r   ÚdisplayzAssertionRewriter.display�  s   € à�{Š{˜: tÑ,Ô,Ð,r   c                 óÞ   — t          j        dt          j        ¦   «         ¦  «        }t          j        |d|z   t          j        ¦   «         ¦  «        }t	          |t          |¦  «        g ¦  «        S )zCall a helper in this module.r(  Ú_)r   r  r  Ú	AttributeÚast_Callr7   )r+   rY   ÚargsÚpy_nameÚattrs        r   rU  zAssertionRewriter.helper…  sN   € å”(˜<­¬©¬Ñ4Ô4ˆÝŒ}˜W c¨D¡jµ#´(±*´*Ñ=Ô=ˆÝ˜�d 4™jœj¨"Ñ-Ô-Ð-r   c                 óœ   — t          j        dt          j        ¦   «         ¦  «        }t          j        ||t          j        ¦   «         ¦  «        S )z!Return the builtin called *name*.r'  )r   r  r  rY  )r+   rY   Úbuiltin_names      r   r‚   zAssertionRewriter.builtin‹  s3   € å”x µ´±
´
Ñ;Ô;ˆÝŒ}˜\¨4µ´±´Ñ<Ô<Ð<r   c                 ón   — dt          t          | j        ¦  «        ¦  «        z   }|| j        |<   d|z   dz   S )aK  Return a new named %-formatting placeholder for expr.

        This creates a %-formatting placeholder for expr in the
        current formatting context, e.g. ``%(py0)s``.  The placeholder
        and expr are placed in the current format context so that it
        can be used on the next call to .pop_format_context().

        rD   z%(z)s)rl   rK  rL  Úexplanation_specifiers)r+   r@  Ú	specifiers      r   Úexplanation_paramz#AssertionRewriter.explanation_param�  s>   € ð �3�t DÔ$9Ñ:Ô:Ñ;Ô;Ñ;ˆ	Ø15ˆÔ# IÑ.Ø�iÑ $Ñ&Ð&r   c                 óR   — i | _         | j                             | j         ¦  «         dS )a�  Create a new formatting context.

        The format context is used for when an explanation wants to
        have a variable value formatted in the assertion message.  In
        this case the value required can be added using
        .explanation_param().  Finally .pop_format_context() is used
        to format a string of %-formatted values as added by
        .explanation_param().

        N)ra  Ústackr=  )r+   s    r   Úpush_format_contextz%AssertionRewriter.push_format_context�  s+   € ð ')ˆÔ#ØŒ
×Ò˜$Ô5Ñ6Ô6Ð6Ð6Ð6r   c           	      ó�  — | j                              ¦   «         }| j         r| j         d         | _        d„ |                     ¦   «         D ¦   «         }t	          j        |t          |                     ¦   «         ¦  «        ¦  «        }t	          j        |t	          j	        ¦   «         |¦  «        }dt          t          | j        ¦  «        ¦  «        z   }| j                             t	          j        t	          j        |t	          j        ¦   «         ¦  «        g|¦  «        ¦  «         t	          j        |t	          j        ¦   «         ¦  «        S )aV  Format the %-formatted string with current format context.

        The expl_expr should be an ast.Str instance constructed from
        the %-placeholders created by .explanation_param().  This will
        add the required code to format said string to .on_failure and
        return the ast.Name instance of the formatted string.

        r0   c                 ó6   — g | ]}t          j        |¦  «        ‘ŒS r›   )r   r4  )r-  Úkeys     r   r/  z8AssertionRewriter.pop_format_context.<locals>.<listcomp>·  s    € Ð7Ð7Ð7 •”˜‘”Ð7Ð7Ð7r   z
@py_format)re  r|   ra  Úkeysr   ÚDictr7   ÚvaluesÚBinOpÚModrl   rK  rL  Ú
on_failurer=  rQ  r  rR  r  )r+   Ú	expl_exprÚcurrentrj  Úformat_dictÚformrY   s          r   Úpop_format_contextz$AssertionRewriter.pop_format_context«  sð   € ð ”*—.’.Ñ"Ô"ˆØŒ:ð 	9Ø*.¬*°R¬.ˆDÔ'Ø7Ð7¨¯ª©¬Ð7Ñ7Ô7ˆÝ”h˜t¥T¨'¯.ª.Ñ*:Ô*:Ñ%;Ô%;Ñ<Ô<ˆÝŒy˜¥C¤G¡I¤I¨{Ñ;Ô;ˆØ�c¥$ tÔ'<Ñ"=Ô"=Ñ>Ô>Ñ>ˆØŒ×Ò�sœz­3¬8°D½#¼)¹+¼+Ñ+FÔ+FÐ*GÈÑNÔNÑOÔOÐOÝŒx˜�cœh™jœjÑ)Ô)Ð)r   c                 ó¸   — t          |t          j        ¦  «        sJ ‚|                      |¦  «        }||                      |                      |¦  «        ¦  «        fS )z1Handle expressions we don't have custom code for.)rÕ   r   r@  rS  rc  rV  )r+   r  r  s      r   Úgeneric_visitzAssertionRewriter.generic_visit¾  sP   € å˜$¥¤Ñ)Ô)Ð)Ð)Ð)Ø�kŠk˜$ÑÔˆØ�D×*Ò*¨4¯<ª<¸Ñ+<Ô+<Ñ=Ô=Ð=Ð=r   c                 óŒ  — t          |j        t          j        ¦  «        r2| j        �+| j        |j        f}| j                             dd|¬¦  «         g | _        g | _	        t          j        ¦   «         | _        g | _        g | _        |                      ¦   «          |                      |j        ¦  «        \  }}| j        }t          j        t          j        ¦   «         |¦  «        }| j                             t          j        ||g ¦  «        ¦  «         |j        r!|                      d|j        ¦  «        }d|z   }nt          j        d¦  «        }d|z   }t          j        |t          j        ¦   «         t          j        |¦  «        ¦  «        }|                      |¦  «        }	|                      d	|	¦  «        }
t          j        d
t          j        ¦   «         ¦  «        }t;          ||
gg ¦  «        }t<          j        d         dk    rt          j         |d¦  «        }nt          j         |dd¦  «        }|                     |¦  «         | j	        rMd„ | j	        D ¦   «         }t          j!        |tE          d¦  «        ¦  «        }| j                             |¦  «         | j        D ]}tG          ||j        |j$        ¦  «         Œ| j        S )a0  Return the AST statements to replace the ast.Assert instance.

        This re-writes the test of an assertion to provide
        intermediate values and replace it with an if statement which
        raises an assertion error with a detailed explanation in case
        the expression is false.

        NÚR1z5assertion is always true, perhaps remove parentheses?)Ú
fslocationÚformat_assertmsgz	
>assert Ú zassert rè   ÚAssertionErrorr   r   c                 óZ   — g | ](}t          j        |t          j        ¦   «         ¦  «        ‘Œ)S r›   ©r   r  rR  )r-  rY   s     r   r/  z2AssertionRewriter.visit_Assert.<locals>.<listcomp>ï  s:   € ð 5ð 5ð 5Ø!õ œ $­¬	©¬Ñ4Ô4ð 5ð 5ð 5r   )%rÕ   Útestr   ÚTupler#   rÜ   r  rz   rP  rM  Ú	itertoolsÚcountrL  re  ro  rf  r<  ÚUnaryOpÚNotr=  ÚIfÚmsgrU  r4  rm  ÚAddrt  r  r  rZ  rG   Úversion_infoÚRaiserQ  r  r!  r  )r+   Úassert_ry  Útop_conditionr÷   r0  ÚnegationÚ	assertmsgÚtemplater†  ÚfmtÚerr_nameÚexcÚraise_rM  ÚclearÚstmts                    r   Úvisit_AssertzAssertionRewriter.visit_AssertÄ  s†  € õ �g”l¥C¤IÑ.Ô.ð 	L°4´;Ð3JØÔ*¨G¬NÐ;ˆJØŒK×Ò˜Tð $4Ø@Jð ñ Lô Lð LàˆŒØˆŒÝ )¤Ñ 1Ô 1ˆÔØˆŒ
ØˆŒØ× Ò Ñ"Ô"Ð"à%)§Z¢Z°´Ñ%=Ô%=Ñ"ˆ�{àŒˆÝ”;�sœw™yœy¨-Ñ8Ô8ˆØŒ×Ò�sœv h°°bÑ9Ô9Ñ:Ô:Ð:ØŒ;ð 	2ØŸšÐ$6¸¼ÑDÔDˆIØ&¨Ñ4ˆKˆKåœ ™œˆIØ# kÑ1ˆKÝ”9˜Y­¬©	¬	µ3´7¸;Ñ3GÔ3GÑHÔHˆØ×%Ò% hÑ/Ô/ˆØ�kŠkÐ.°Ñ4Ô4ˆÝ”8Ð,­c¬h©j¬jÑ9Ô9ˆÝ�x # ¨Ñ+Ô+ˆÝÔ˜AÔ !Ò#Ð#Ý”Y˜s DÑ)Ô)ˆFˆFå”Y˜s D¨$Ñ/Ô/ˆFØ�Š�FÑÔÐàŒ>ð 	*ð5ð 5Ø%)¤^ð5ñ 5ô 5ˆIå”J˜y­-¸Ñ*=Ô*=Ñ>Ô>ˆEØŒO×"Ò" 5Ñ)Ô)Ð)à”Oð 	Cð 	CˆDÝ˜˜wœ~¨wÔ/AÑBÔBÐBÐBØŒÐr   c                 óô  — t          |                      d¦  «        g g ¦  «        }t          j        t          j        |j        ¦  «        t          j        ¦   «         g|g¦  «        }|                      d|¦  «        }t          j        t          j	        ¦   «         ||g¦  «        }t          j
        ||                      |¦  «        t          j        |j        ¦  «        ¦  «        }||                      |¦  «        fS )NÚlocalsÚshould_repr_global_name)rZ  r‚   r   ÚComparer4  ÚidÚInrU  ÚBoolOpÚOrÚIfExprV  rc  )r+   rY   ÚlocsÚinlocsÚdoreprr  r@  s          r   Ú
visit_NamezAssertionRewriter.visit_Nameø  s¾   € õ ˜Ÿš XÑ.Ô.°°BÑ7Ô7ˆÝ”�SœW T¤WÑ-Ô-µ´±´¨z¸D¸6ÑBÔBˆØ—’Ð6¸Ñ=Ô=ˆÝŒz�#œ&™(œ( V¨VÐ$4Ñ5Ô5ˆÝŒy˜˜tŸ|š|¨DÑ1Ô1µ3´7¸4¼7Ñ3CÔ3CÑDÔDˆØ�T×+Ò+¨DÑ1Ô1Ð1Ð1r   c           
      óþ  — |                       ¦   «         }|                      t          j        g t          j        ¦   «         ¦  «        ¦  «        }t          j        |dt          j        ¦   «         ¦  «        }t          t          |j        t          j	        ¦  «        ¦  «        }| j
        x}}| j        }t          |j        ¦  «        dz
  }	|                      ¦   «          t          |j        ¦  «        D �]†\  }
}|
r7g }| j                             t          j        ||g ¦  «        ¦  «         || _        |                      ¦   «          |                      |¦  «        \  }}|                     t          j        t          j        |t          j        ¦   «         ¦  «        g|¦  «        ¦  «         |                      t          j        |¦  «        ¦  «        }t1          ||gg ¦  «        }| j                             t          j        |¦  «        ¦  «         |
|	k     rc|}|r&t          j        t          j        ¦   «         |¦  «        }g }| j
                             t          j        ||g ¦  «        ¦  «         |x| _
        }�Œˆ|| _
        || _        |                      d|t          j        |¦  «        ¦  «        }|                      |¦  «        }t          j        |t          j        ¦   «         ¦  «        |                      |¦  «        fS )Nr=  r   Úformat_boolop)rN  rS  r   ÚListr  rY  r¡   rÕ   Úopr�  rP  ro  r8   rl  rf  r9  r=  r…  r<  rQ  r  rR  rt  r4  rZ  r2  rƒ  r„  rU  ÚNumrc  )r+   ÚboolopÚres_varÚ	expl_listÚapprö   r0  ÚsaveÚ	fail_saveÚlevelsr  ÚvÚ
fail_innerÚcondr  r  Úexpl_formatÚcallÚinnerÚexpl_templates                       r   Úvisit_BoolOpzAssertionRewriter.visit_BoolOp  sd  € Ø—-’-‘/”/ˆØ—K’K¥¤¨­S¬X©Z¬ZÑ 8Ô 8Ñ9Ô9ˆ	ÝŒm˜I xµ´±´Ñ<Ô<ˆÝ•J˜vœy­#¬&Ñ1Ô1Ñ2Ô2ˆØ”oÐ%ˆˆtØ”Oˆ	Ý�V”]Ñ#Ô# aÑ'ˆØ× Ò Ñ"Ô"Ð"å˜fœmÑ,Ô,ð 	/ñ 	/‰DˆAˆqØð -Ø�
à”×&Ò&¥s¤v¨d°JÀÑ'CÔ'CÑDÔDÐDØ",�”Ø×$Ò$Ñ&Ô&Ð&ØŸ
š
 1™œ‰IˆC�Ø�KŠK�œ
¥C¤H¨Wµc´i±k´kÑ$BÔ$BÐ#CÀSÑIÔIÑJÔJÐJØ×1Ò1µ#´'¸$±-´-Ñ@Ô@ˆKÝ˜C + °Ñ3Ô3ˆDØŒO×"Ò"¥3¤8¨D¡>¤>Ñ2Ô2Ð2Ø�6ŠzˆzØ�Øð 8Ýœ;¥s¤w¡y¤y°$Ñ7Ô7�DØ�Ø”×&Ò&¥s¤v¨d°E¸2Ñ'>Ô'>Ñ?Ô?Ð?Ø).Ð.�” $ùØˆŒØ#ˆŒØŸš O°YÅÄÈÁÄÑOÔOˆØ×&Ò& }Ñ5Ô5ˆÝŒx˜¥¤¡¤Ñ,Ô,¨d×.DÒ.DÀTÑ.JÔ.JÐJÐJr   c                 óÔ   — t           |j        j                 }|                      |j        ¦  «        \  }}|                      t          j        |j        |¦  «        ¦  «        }|||fz  fS r   )Ú	unary_mapr¦  r%  r<  ÚoperandrS  r   rƒ  )r+   ÚunaryÚpatternÚoperand_resÚoperand_explr  s         r   Úvisit_UnaryOpzAssertionRewriter.visit_UnaryOp%  sZ   € Ý˜EœHÔ.Ô/ˆØ$(§J¢J¨u¬}Ñ$=Ô$=Ñ!ˆ�\Ø�kŠk�#œ+ e¤h°Ñ<Ô<Ñ=Ô=ˆØ�G˜|˜oÑ-Ð-Ð-r   c                 ó   — t           |j        j                 }|                      |j        ¦  «        \  }}|                      |j        ¦  «        \  }}d|›d|›d|›d�}|                      t          j        ||j        |¦  «        ¦  «        }||fS )Nrô   ú rk   )	Ú	binop_mapr¦  r%  r<  ÚleftÚrightrS  r   rm  )	r+   ÚbinopÚsymbolÚ	left_exprÚ	left_explÚ
right_exprÚ
right_explr÷   r  s	            r   Úvisit_BinOpzAssertionRewriter.visit_BinOp+  s‡   € Ý˜5œ8Ô-Ô.ˆØ#Ÿzšz¨%¬*Ñ5Ô5Ñˆ	�9Ø!%§¢¨E¬KÑ!8Ô!8Ñˆ
�J�JØ&/ i i°°°¸¸¸ÐDˆØ�kŠk�#œ) I¨u¬x¸ÑDÔDÑEÔEˆØ�KÐÐr   c                 ó  — |                       |j        ¦  «        \  }}g }g }g }|j        D ]D}|                       |¦  «        \  }}	|                     |	¦  «         |                     |¦  «         ŒE|j        D ]Œ}
|                       |
j        ¦  «        \  }}	|                     t          j        |
j        |¦  «        ¦  «         |
j        r!|                     |
j        dz   |	z   ¦  «         Œt|                     d|	z   ¦  «         Œ�|›dd 	                    |¦  «        ›d�}	t          j
        |||¦  «        }|                      |¦  «        }|                      |                      |¦  «        ¦  «        }|›d|›d|	›d�}||fS )	z?
        visit `ast.Call` nodes on Python3.5 and after
        ú=r  rô   ú, rk   ú
{ú = ú
})r<  Úfuncr[  r=  Úkeywordsr3  r   ÚkeywordÚargrB   r   rS  rc  rV  )r+   r³  Únew_funcÚ	func_explÚ	arg_explsÚnew_argsÚ
new_kwargsrÔ  r  r  rÓ  Únew_callÚres_explÚ
outer_expls                 r   Úvisit_Call_35zAssertionRewriter.visit_Call_353  s�  € ð #Ÿjšj¨¬Ñ3Ô3Ñˆ�)Øˆ	ØˆØˆ
Ø”9ð 	!ð 	!ˆCØŸ
š
 3™œ‰IˆC�Ø×Ò˜TÑ"Ô"Ð"Ø�OŠO˜CÑ Ô Ð Ð Ø”}ð 	.ð 	.ˆGØŸ
š
 7¤=Ñ1Ô1‰IˆC�Ø×Ò�cœk¨'¬+°sÑ;Ô;Ñ<Ô<Ð<ØŒ{ð .Ø× Ò  ¤¨sÑ!2°TÑ!9Ñ:Ô:Ð:Ð:à× Ò  ¨¡Ñ-Ô-Ð-Ð-à$˜9˜9 d§i¢i°	Ñ&:Ô&:Ð&:Ð&:Ð;ˆÝ”8˜H h°
Ñ;Ô;ˆØ�kŠk˜(Ñ#Ô#ˆØ×)Ò)¨$¯,ª,°sÑ*;Ô*;Ñ<Ô<ˆØ*2¨(¨(°H°H°H¸d¸d¸dÐCˆ
Ø�JˆÐr   c                 óJ   — |                       |j        ¦  «        \  }}|d|z   fS )Nr  )r<  r3  )r+   Ústarredr  r  s       r   Úvisit_StarredzAssertionRewriter.visit_StarredN  s(   € à—J’J˜wœ}Ñ-Ô-‰	ˆˆTØ˜˜d™
Ð"Ð"r   c                 ó¾  — |                       |j        ¦  «        \  }}g }g }g }dx}}|j        D ]D}	|                       |	¦  «        \  }
}|                     |
¦  «         |                     |¦  «         ŒE|j        D ]l}|                       |j        ¦  «        \  }
}|                     t          j        |j        |
¦  «        ¦  «         |                     |j        dz   |z   ¦  «         Œm|j	        r5|                       |j	        ¦  «        \  }}|                     d|z   ¦  «         |j
        r5|                       |j
        ¦  «        \  }}|                     d|z   ¦  «         |›dd                     |¦  «        ›d�}t          j        |||||¦  «        }|                      |¦  «        }
|                      |                      |
¦  «        ¦  «        }|›d|›d	|›d
�}|
|fS )z9
        visit `ast.Call nodes on 3.4 and below`
        NrÌ  r  r  rô   rÍ  rk   rÎ  rÏ  rÐ  )r<  rÑ  r[  r=  rÒ  r3  r   rÓ  rÔ  ÚstarargsÚkwargsrB   r   rS  rc  rV  )r+   r³  rÕ  rÖ  r×  rØ  rÙ  Únew_starÚ	new_kwargrÔ  r  r  rÓ  rÚ  rÛ  rÜ  s                   r   Úvisit_Call_legacyz#AssertionRewriter.visit_Call_legacyS  sï  € ð #Ÿjšj¨¬Ñ3Ô3Ñˆ�)Øˆ	ØˆØˆ
Ø#Ð#ˆ�9Ø”9ð 	#ð 	#ˆCØŸ
š
 3™œ‰IˆC�Ø�OŠO˜CÑ Ô Ð Ø×Ò˜TÑ"Ô"Ð"Ð"Ø”}ð 	7ð 	7ˆGØŸ
š
 7¤=Ñ1Ô1‰IˆC�Ø×Ò�cœk¨'¬+°sÑ;Ô;Ñ<Ô<Ð<Ø×Ò˜Wœ[¨3Ñ.°Ñ5Ñ6Ô6Ð6Ð6ØŒ=ð 	)Ø!ŸZšZ¨¬Ñ6Ô6‰NˆH�dØ×Ò˜S 4™ZÑ(Ô(Ð(ØŒ;ð 	*Ø"Ÿjšj¨¬Ñ5Ô5‰OˆI�tØ×Ò˜T D™[Ñ)Ô)Ð)Ø$˜9˜9 d§i¢i°	Ñ&:Ô&:Ð&:Ð&:Ð;ˆÝ”8˜H h°
Ø$ iñ1ô 1ˆà�kŠk˜(Ñ#Ô#ˆØ×)Ò)¨$¯,ª,°sÑ*;Ô*;Ñ<Ô<ˆØ*2¨(¨(°H°H°H¸d¸d¸dÐCˆ
Ø�JˆÐr   r   c                 óš  — t          |j        t          j        ¦  «        s|                      |¦  «        S |                      |j        ¦  «        \  }}|                      t          j        ||j	        t          j        ¦   «         ¦  «        ¦  «        }|  
                    |                      |¦  «        ¦  «        }d}|||||j	        fz  }||fS )Nz%s
{%s = %s.%s
})rÕ   Úctxr   r  rv  r<  r3  rS  rY  r]  rc  rV  )r+   r]  r3  Ú
value_explr  rÛ  ro   r  s           r   Úvisit_Attributez!AssertionRewriter.visit_Attribute{  s®   € Ý˜$œ(¥C¤HÑ-Ô-ð 	,Ø×%Ò% dÑ+Ô+Ð+Ø ŸJšJ t¤zÑ2Ô2ÑˆˆzØ�kŠk�#œ-¨¨t¬y½#¼(¹*¼*ÑEÔEÑFÔFˆØ×)Ò)¨$¯,ª,°sÑ*;Ô*;Ñ<Ô<ˆØ"ˆØ�h ¨*°d´iÐ@Ñ@ˆØ�DˆyÐr   c                 ó€  ‡ — ‰                       ¦   «          ‰                      |j        ¦  «        \  }}t          |j        t          j        t          j        f¦  «        rd                     |¦  «        }ˆ fd„t          t          |j
        ¦  «        ¦  «        D ¦   «         }d„ |D ¦   «         }d„ |D ¦   «         }t          t          t          |j
        ¦  «        ¦  «        |j
        |j        ¦  «        }g }g }	|g}
|D �])\  }}}‰                      |¦  «        \  }}t          |t          j        t          j        f¦  «        rd                     |¦  «        }|
                     |¦  «         t          |j                 }|	                     t!          j        |¦  «        ¦  «         |›d|›d|›�}|                     t!          j        |¦  «        ¦  «         t!          j        ||g|g¦  «        }‰ j                             t!          j        ||         g|¦  «        ¦  «         ||}}�Œ+‰                      dt!          j        |	t!          j        ¦   «         ¦  «        t!          j        |t!          j        ¦   «         ¦  «        t!          j        |t!          j        ¦   «         ¦  «        t!          j        |
t!          j        ¦   «         ¦  «        ¦  «        }t          |j
        ¦  «        dk    r't!          j        t!          j        ¦   «         |¦  «        }n|d         }|‰                      ‰                      |¦  «        ¦  «        fS )	Nz({0})c                 ó8   •— g | ]}‰                      ¦   «         ‘ŒS r›   )rN  )r-  r  r+   s     €r   r/  z3AssertionRewriter.visit_Compare.<locals>.<listcomp>Š  s!   ø€ ÐGÐGÐG¨Q˜Ÿš™œÐGÐGÐGr   c                 óZ   — g | ](}t          j        |t          j        ¦   «         ¦  «        ‘Œ)S r›   )r   r  r  ©r-  r¯  s     r   r/  z3AssertionRewriter.visit_Compare.<locals>.<listcomp>‹  s*   € ÐEÐEÐE°!•c”h˜q¥#¤(¡*¤*Ñ-Ô-ÐEÐEÐEr   c                 óZ   — g | ](}t          j        |t          j        ¦   «         ¦  «        ‘Œ)S r›   r~  rî  s     r   r/  z3AssertionRewriter.visit_Compare.<locals>.<listcomp>Œ  s*   € ÐGÐGÐG°A•s”x ¥3¤9¡;¤;Ñ/Ô/ÐGÐGÐGr   rÀ  Úcall_reprcomparer   r   )rf  r<  rÂ  rÕ   Ú_astr™  rœ  Úformatrû   r8   rý   rú   Úcomparatorsr=  rÁ  r%  r   r4  rP  rQ  rU  r€  r  ÚAndrc  rt  )r+   ÚcompÚleft_resrÇ  Úres_variablesÚ
load_namesÚstore_namesÚitrÿ   Úsymsrþ   r  r¦  Únext_operandÚnext_resÚ	next_explÚsymr  Úres_exprÚ	expl_callr  s   `                    r   Úvisit_ComparezAssertionRewriter.visit_Compare…  s¶  ø€ Ø× Ò Ñ"Ô"Ð"Ø"Ÿjšj¨¬Ñ3Ô3Ñˆ�)Ý�d”i¥$¤,µ´Ð!<Ñ=Ô=ð 	2ØŸš yÑ1Ô1ˆIØGÐGÐGÐGµ%½¸D¼H¹¼Ñ2FÔ2FÐGÑGÔGˆØEÐE°}ÐEÑEÔEˆ
ØGÐG¸ÐGÑGÔGˆÝ••s˜4œ8‘}”}Ñ%Ô% t¤x°Ô1AÑBÔBˆØˆØˆØ�*ˆØ#%ð 	6ñ 	6ÑˆAˆr�<Ø"&§*¢*¨\Ñ":Ô":ÑˆH�iÝ˜,­¬µt´{Ð(CÑDÔDð 6Ø#ŸNšN¨9Ñ5Ô5�	Ø�NŠN˜8Ñ$Ô$Ð$Ý˜BœLÔ)ˆCØ�KŠK�œ ™œÑ%Ô%Ð%Ø!*  ¨C¨C¨C°°Ð;ˆDØ�LŠL�œ ™œÑ'Ô'Ð'Ý”{ 8¨b¨T°H°:Ñ>Ô>ˆHØŒO×"Ò"¥3¤:¨{¸1¬~Ð.>ÀÑ#IÔ#IÑJÔJÐJØ"*¨I�iˆH‰Hà—K’KÐ 2Ý #¤	¨$µ´±
´
Ñ ;Ô ;Ý #¤	¨*µc´h±j´jÑ AÔ AÝ #¤	¨%µ´±´Ñ <Ô <Ý #¤	¨'µ3´8±:´:Ñ >Ô >ñ	@ô @ˆ	õ
 ˆtŒx‰=Œ=˜1ÒÐÝ”*�SœW™YœY¨
Ñ3Ô3ˆCˆCà˜Q”-ˆCØ�D×*Ò*¨4×+BÒ+BÀ9Ñ+MÔ+MÑNÔNÐNÐNr   )rŒ   r—   r˜   r™   r,   rÛ   rN  rS  rV  rU  r‚   rc  rf  rt  rv  r•  r¢  r¶  r¾  rÊ  rÝ  rà  ræ  rG   rˆ  Ú
visit_Callrê  r  Ú__classcell__)r%  s   @r   rÚ   rÚ     s™  ø€ € € € € ð1ð 1ðfð ð ð ð ð
1(ð 1(ð 1(ðfð ð ð*ð *ð *ð-ð -ð -ð.ð .ð .ð=ð =ð =ð
'ð 'ð 'ð7ð 7ð 7ð*ð *ð *ð&>ð >ð >ð2ð 2ð 2ðh2ð 2ð 2ð!Kð !Kð !KðF.ð .ð .ð ð  ð  ðð ð ð6#ð #ð #ð
ð ð ðD Ô˜6Ò!Ð!Ø"ˆ
ˆ
à&ˆ
ðð ð ð"Oð "Oð "Oð "Oð "Oð "Oð "Or   rÚ   r­   )Ur™   r   rñ  rM   r�  r9   r¦   r@   Úrer¤   rG   rÖ   r   rD   Ú_pytest.assertionr   r>   r   Ú
PYTEST_TAGÚimplrÉ   rˆ  ÚverÚPYC_EXTrU   rº   r³   r   rZ  Úobjectr    rª   Úencoder¼   r½   rÁ   r¶   rµ   rW   rX   rV   rÀ   rç   Ú_pytest.assertion.utilrè   Ú_format_explanationrï   rò   rø   r  r„  ÚInvertÚUSubÚUAddr¸  ÚBitOrÚBitXorÚBitAndÚLShiftÚRShiftr‡  ÚSubÚMultÚDivÚFloorDivrn  ÚEqÚNotEqÚLtÚLtEÚGtÚGtEÚPowÚIsÚIsNotr›  ÚNotInrÁ  ÚMatMultÚAttributeErrorr  r  r!  ÚNodeVisitorrÚ   r›   r   r   ú<module>r(     sÌ  ðØ :Ð :à 
€
€
€
Ø €€€Ø €€€Ø Ð Ð Ð Ø 
€
€
€
Ø €€€Ø 	€	€	€	Ø 	€	€	€	Ø €€€Ø 
€
€
€
Ø €€€Ø Ð Ð Ð Ð Ð à 	€	€	€	Ø "Ð "Ð "Ð "Ð "Ð "ð €7ˆ3�	ÑÔð Ø�”‘” Ñ*€J€Jà€wˆsÐ'Ñ(Ô(ð ØˆˆØ	Œ˜Ò	Ð	ØˆˆàˆØ
Ô
€CØ%) T T¨3¨q¬6¨6°3°q´6°6°6Ð:€JØˆTà
 Ð+¨Ñ
,€Ø�Ñ˜gÑ%€àÔ# B Q BÔ'¨6Ò1ÐO°cÔ6FÈÒ6OÐ ØÔ,¨QÔ/°!Ò3Ð àÔ�uÒÐØŒx€H€Hà:Ð:€HðHð Hð Hð Hð H˜Vñ Hô Hð HðVð ð ð2 ‡]‚]�7ÑÔ€Ø‡K‚K�ÑÔ€àˆBŒJÐ=Ñ>Ô>€	Ø€ð7ð 7ð 7ðr%ð %ð %ð "0 ð ð ð ð ðB4ð 4ð 4ð 4ð
+ð +ð +ð& MÐ LÐ LÐ LÐ LÐ Lðð ð ð6Ið Ið Ið0ð 0ð 0ðð ð ð  „GˆXØ„J�Ø„HˆeØ„Hˆeð	€	ðØ„Iˆsðà„J�ðð „J�ðð „J�ð	ð
 „J�ðð „GˆSðð „GˆSðð „Hˆcðð „GˆSðð „L�$ðð „GˆTðð „FˆDðð „Iˆtðð „FˆCðð „GˆTðð  „FˆCð!ð" „GˆTð#ð$ „GˆTØ„FˆDØ„IˆxØ„FˆDØ„Iˆxð-ð €	ð2	Ø €IˆcŒkÑÐøØð 	ð 	ð 	Ø€Dð	øøøð €7ˆ3�ÑÔð ,ØÔ$€M€Mð,ð ,ð ,ð
ð 
ð 
ð_Oð _Oð _Oð _Oð _O˜œñ _Oô _Oð _Oð _Oð _Os   È0
H; È;IÉI