ó
    &s¥j¿  ã                   óh   • S r SSKrSSKJs  Jr  SSKJr  SSK	J
r
Jr  S rS rS rS rS	 rS
 rS rg)z~The plain-language line a reference carries for its status, and the
label that names what a source is without the status code.é    N)ÚCELL_STATUS_REFERENCE)Ú_labelÚ_reasonc            	      ó¸  • [          GHÏ  n / oR                  S   o"R                  o3" 5       oDoT(       a!  U R                  ofR                  nSo‡" U5      o™nU(       Gdr  S[        R
                  " U5      [        R
                  " U5      [        R
                  " U5      S.-  o¡R                  U
5        U(       aµ  SS[        R                  " 5       ;   d  [        R                  " U 5      (       a  [        R
                  " U 5      OS[        R
                  " W5      [        R
                  " W5      [        R
                  " W5      [        R
                  " W	5      S.-  o±R                  U5        [        R                  " US5      0 -  n[        R                  " U R                  5      S-   S	U0-  n[        [        R                  " U5      5      eS =n=n=n=n=n=n=n=p‰S
oPR                  o5U;  o"(       dÛ  [        R                  " SU4SXS45      [        R
                  " U5      S[        R                  " 5       ;   d  [        R                  " U 5      (       a  [        R
                  " U 5      OS[        R
                  " U5      S.-  n[        R                  " U R                  5      S-   SU0-  n
[        [        R                  " U
5      5      eS =n=p#GMÒ     g )Nr   Ú.z;%(py7)s
{%(py7)s = %(py5)s
{%(py5)s = %(py3)s.isupper
}()
})Úpy3Úpy5Úpy7ze%(py17)s
{%(py17)s = %(py13)s
{%(py13)s = %(py11)s
{%(py11)s = %(py9)s.label
}.endswith
}(%(py15)s)
}Ús)Úpy9Úpy11Úpy13Úpy15Úpy17z
>assert %(py20)sÚpy20Ú_)únot in)z1%(py1)s not in %(py5)s
{%(py5)s = %(py3)s.label
})Úpy1r   r	   z
>assert %(py7)sr
   )r   ÚlabelÚisupperÚendswithÚ
@pytest_arÚ	_safereprÚappendÚ@py_builtinsÚlocalsÚ_should_repr_global_nameÚ_format_boolopÚ_format_assertmsgÚcodeÚAssertionErrorÚ_format_explanationÚ_call_reprcompare)r   Ú@py_assert1Ú@py_assert2Ú@py_assert4Ú@py_assert6Ú@py_assert0Ú@py_assert10Ú@py_assert12Ú@py_assert14Ú@py_assert16Ú@py_format8Ú@py_format18Ú@py_format19Ú@py_format21Ú@py_format6s                  Ú:/home/mande/repo/quber/tests/playground/test_references.pyÚ-test_every_registry_label_reads_as_a_sentencer3      sŽ  € ß"Ð"ˆÙE�w‰w�q‰zÐE×!Ñ!ÐEÐ!Ó#ÑEÕ#¨¯©ÐE×(8Ñ(8ÐE¸ÐEÐ(8¸Ó(=×E×E×EÒEˆz×E×EÓEÐ!×E×EÓEÐ#×E×E×EÐEÖ#×E×E×E×E×EÑE¨×E×E×EÑE¨×E×EÕE¨×E×EÓEÐ(8×E×EÓE¸×E×EÓEÐ(=×E×E×E×E×E×E×E×EÒE¸q¿v¹v×E×E×E×E×E×E×EÔEØÐ)Ÿ'™'Ð)˜'Ñ!×)×)×)Ò)ˆs×)×)Ô)ˆs×)×)×)×)×)Ô)˜!×)×)×)Ñ)˜!×)×)Õ)˜'×)×)×)Ð) 1§6¡6×)×)×)×)×)×)Ó)ò #ó    c                  óð  • [        SSS5      u  pSo U:H  o3(       d¥  [        R                  " SU4SX45      S[        R                  " 5       ;   d  [        R
                  " U 5      (       a  [        R                  " U 5      OS[        R                  " U5      S.-  nS	S
U0-  n[        [        R                  " U5      5      eS =p2S o!UL o3(       d¥  [        R                  " SU4SX45      S[        R                  " 5       ;   d  [        R
                  " U5      (       a  [        R                  " U5      OS[        R                  " U5      S.-  nS	S
U0-  n[        [        R                  " U5      5      eS =p2g )NÚvalue_unreconciledz#one measurement, read from the pagez4%zFRead from the chart once, without a second check. Worth a manual look.©ú==©z%(py0)s == %(py3)sÚreason©Úpy0r   úassert %(py5)sr	   ©Úis©z%(py0)s is %(py3)sÚprinted©	r   r   r#   r   r   r   r   r!   r"   ©r:   rA   r%   r$   Ú@py_format4r1   s         r2   Ú!test_reason_is_the_registry_labelrE      sÌ   € ÜÐ2Ð4YÐ[_Ó`�O€FØ]Ð]Ð]Ñ]×]×]×]Ò]ˆ6×]×]×]×]×]Õ]ˆ6×]×]×]Ñ]ˆ6×]×]Õ]Ð]×]×]×]×]×]×]Ñ]ØÐ�dˆ?×××Òˆ7×××××Õˆ7×××Ñˆ7××Õ�d××××××Òr4   c                  óö  • Sn [        SU S5      u  pSo1U:H  oD(       d¥  [        R                  " SU4SX45      S[        R                  " 5       ;   d  [        R
                  " U5      (       a  [        R                  " U5      OS[        R                  " U5      S.-  nS	S
U0-  n[        [        R                  " U5      5      eS =pCSo2U:H  oD(       d¥  [        R                  " SU4SX#45      S[        R                  " 5       ;   d  [        R
                  " U5      (       a  [        R                  " U5      OS[        R                  " U5      S.-  nS	S
U0-  n[        [        R                  " U5      5      eS =pCg )NzFthe page prints '6%' where this value should appear - possible misreadÚvalue_misreadú11%z7The page prints 6% here, not 11%. Check which is right.r7   r9   r:   r;   r=   r	   z6%rA   rB   )Únoter:   rA   r%   r$   rD   r1   s          r2   Útest_misread_names_both_figuresrJ      sÎ   € ØS€DÜ˜o¨t°UÓ;�O€FØNÐNÐNÑN×N×N×NÒNˆ6×N×N×N×N×NÕNˆ6×N×N×NÑNˆ6×N×NÕNÐN×N×N×N×N×N×NÑNØÐ�d‰?×××Òˆ7×××××Õˆ7×××Ñˆ7××Õ�d××××××Òr4   c                  óò  • [        SSS5      u  pSo U:H  o3(       d¥  [        R                  " SU4SX45      S[        R                  " 5       ;   d  [        R
                  " U 5      (       a  [        R                  " U 5      OS[        R                  " U5      S.-  nS	S
U0-  n[        [        R                  " U5      5      eS =p2So!U:H  o3(       d¥  [        R                  " SU4SX45      S[        R                  " 5       ;   d  [        R
                  " U5      (       a  [        R                  " U5      OS[        R                  " U5      S.-  nS	S
U0-  n[        [        R                  " U5      5      eS =p2g )NrG   z/fragment at the value's position prints '~ 87%'z~87%z;The page prints ~ 87% here, not ~87%. Check which is right.r7   r9   r:   r;   r=   r	   z~ 87%rA   rB   rC   s         r2   Ú)test_misread_reads_the_fragment_shape_toorL      sÌ   € Ü˜oÐ/`ÐbhÓi�O€FØRÐRÐRÑR×R×R×RÒRˆ6×R×R×R×R×RÕRˆ6×R×R×RÑRˆ6×R×RÕRÐR×R×R×R×R×R×RÑRØÐ�gÑ×××Òˆ7×××××Õˆ7×××Ñˆ7××Õ�g××××××Òr4   c                  óð  • [        SSS5      u  pSo U:H  o3(       d¥  [        R                  " SU4SX45      S[        R                  " 5       ;   d  [        R
                  " U 5      (       a  [        R                  " U 5      OS[        R                  " U5      S.-  nS	S
U0-  n[        [        R                  " U5      5      eS =p2S o!UL o3(       d¥  [        R                  " SU4SX45      S[        R                  " 5       ;   d  [        R
                  " U5      (       a  [        R                  " U5      OS[        R                  " U5      S.-  nS	S
U0-  n[        [        R                  " U5      5      eS =p2g )NrG   zno printed figure recordedrH   z>The page prints a different figure here. Check which is right.r7   r9   r:   r;   r=   r	   r>   r@   rA   rB   rC   s         r2   Ú<test_misread_without_a_parsable_note_falls_back_to_the_labelrN   !   sÊ   € Ü˜oÐ/KÈUÓS�O€FØUÐUÐUÑU×U×U×UÒUˆ6×U×U×U×U×UÕUˆ6×U×U×UÑUˆ6×U×UÕUÐU×U×U×U×U×U×UÑUØÐ�dˆ?×××Òˆ7×××××Õˆ7×××Ñˆ7××Õ�d××××××Òr4   c            	      óZ  • S n S nSn[        XU5      nSoCU:H  oU(       Gd  [        R                  " SU4SX445      S[        R                  " 5       ;   d  [        R
                  " [         5      (       a  [        R                  " [         5      OS[        R                  " U 5      [        R                  " U5      [        R                  " U5      [        R                  " U5      [        R                  " U5      S.-  nSSU0-  n[        [        R                  " U5      5      eS =n =n=n=n=pTg )	Nz$1)NNr7   )zC%(py8)s
{%(py8)s = %(py0)s(%(py2)s, %(py4)s, %(py6)s)
} == %(py11)sr   )r<   Úpy2Úpy4Úpy6Úpy8r   zassert %(py13)sr   rB   )r$   Ú@py_assert3Ú@py_assert5Ú@py_assert7r)   Ú@py_assert9Ú@py_format12Ú@py_format14s           r2   Útest_no_status_means_no_reasonrZ   '   s©   € ØÐ4˜Ð4˜tÐ4Œ7�4˜tÓ$Ð4¨Ð4¨Ñ4×4×4×4Ó4Ð$×4×4×4×4×4Õ4Œ7×4×4×4Ñ4Œ7×4×4Õ4�4×4×4Ó4˜×4×4Ó4˜t×4×4Ó4Ð$×4×4Ó4¨×4×4×4×4×4×4×4Ò4r4   c            
      ó4	  • S GHa  n SnSn[        XU 5      nSoCU:H  oU(       Gd7  [        R                  " SU4SX445      S[        R                  " 5       ;   d  [        R
                  " [         5      (       a  [        R                  " [         5      OS[        R                  " U5      [        R                  " U5      S[        R                  " 5       ;   d  [        R
                  " U 5      (       a  [        R                  " U 5      OS[        R                  " U5      [        R                  " U5      S	.-  nS
SU0-  n[        [        R                  " U5      5      eS =n=n=n=pTGMd     SnSn[        X5      nSoXU:H  o™(       dì  [        R                  " SU	4SX…45      S[        R                  " 5       ;   d  [        R
                  " [         5      (       a  [        R                  " [         5      OS[        R                  " U5      [        R                  " U5      [        R                  " U5      [        R                  " U5      S.-  n
SSU
0-  n[        [        R                  " U5      5      eS =n=n=n=p•SnSn[        X5      nSoXU:H  o™(       dì  [        R                  " SU	4SX…45      S[        R                  " 5       ;   d  [        R
                  " [         5      (       a  [        R                  " [         5      OS[        R                  " U5      [        R                  " U5      [        R                  " U5      [        R                  " U5      S.-  n
SSU
0-  n[        [        R                  " U5      5      eS =n=n=n=p•SnSn[        X5      nSoXU:H  o™(       dì  [        R                  " SU	4SX…45      S[        R                  " 5       ;   d  [        R
                  " [         5      (       a  [        R                  " [         5      OS[        R                  " U5      [        R                  " U5      [        R                  " U5      [        R                  " U5      S.-  n
SSU
0-  n[        [        R                  " U5      5      eS =n=n=n=p•g )N)Ú
reconciledÚdefectrG   NÚ	tableCellé   zPage 6, table cellr7   )zC%(py7)s
{%(py7)s = %(py0)s(%(py2)s, %(py4)s, %(py5)s)
} == %(py10)sr   Ústatus)r<   rP   rQ   r	   r
   Úpy10zassert %(py12)sÚpy12ÚfigureValueé   zPage 12, chart value)z9%(py6)s
{%(py6)s = %(py0)s(%(py2)s, %(py4)s)
} == %(py9)s)r<   rP   rQ   rR   r   zassert %(py11)sr   Ú	line_itemé   zPage 3, table rowÚtexté   zPage 2, text)	r   r   r#   r   r   r   r   r!   r"   )r`   r$   rT   r'   rW   Ú@py_assert8Ú@py_format11Ú@py_format13rU   rV   Ú@py_format10rX   s               r2   Ú(test_label_never_carries_the_status_coderm   +   sˆ  € ÜAˆØ!ÐE 1ÐEŒv�k fÓ-ÐEÐ1EÐEÐ1EÑE×E×E×EÓEÐ-×E×E×E×E×EÕEŒv×E×E×EÑEŒv×E×EÕE�k×E×EÓE 1×E×E×E×E×EÔE f×E×E×EÑE f×E×EÕEÐ-×E×EÓEÐ1E×E×E×E×E×E×E×EÒEñ BàÐ> Ð>Œ6�-Ó$Ð>Ð(>Ð>Ð(>Ñ>×>×>×>Ò>Ð$×>×>×>×>×>Õ>Œ6×>×>×>Ñ>Œ6×>×>Õ>�-×>×>Ó> ×>×>Ó>Ð$×>×>Ó>Ð(>×>×>×>×>×>×>×>ØÐ8˜qÐ8Œ6�+Ó!Ð8Ð%8Ð8Ð%8Ñ8×8×8×8Ò8Ð!×8×8×8×8×8Õ8Œ6×8×8×8Ñ8Œ6×8×8Õ8�+×8×8Ó8˜q×8×8Ó8Ð!×8×8Ó8Ð%8×8×8×8×8×8×8×8ØÐ.˜!Ð.Œ6�&ÓÐ. Ð. Ñ.×.×.×.Ò.Ð×.×.×.×.×.Õ.Œ6×.×.×.Ñ.Œ6×.×.Õ.�&×.×.Ó.˜!×.×.Ó.Ð×.×.Ó. ×.×.×.×.×.×.×.Ð.r4   )Ú__doc__Úbuiltinsr   Ú_pytest.assertion.rewriteÚ	assertionÚrewriter   Úquber.core.extractors.baser   Úquber.playground.appr   r   r3   rE   rJ   rL   rN   rZ   rm   © r4   r2   Ú<module>rv      s:   ðñ>÷ „ Õ <ß 0ò*òòòòò5ó/r4   