+
    ž‹Öj  c                   óZ  € ^ RI t^ RIHu Ht ^ RIt^ RIHt ]P                  P                  R. R	O4      R 4       t]P                  P                  R. R
O4      R 4       tR t]P                  P                  R. RO4      R 4       t]P                  P                  R. RO4      R 4       tR# )é    N)Ú	SigFigNumÚnumc                óÐ  € \        V 4      pVP                  q P                  q3! 4       qBV8H  qU'       Eg+   \        P                  ! RV3RW$34      RR\
        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      RR\
        P                  ! 4       9   g   \        P                  ! V 4      '       d   \        P                  ! V 4      MRR\        P                  ! V4      R\        P                  ! V4      /,          pRR	V/,          p\        \        P                  ! V4      4      hR
;p;p;r4R
# )z>Accept valid integer, decimal, and scientific notation inputs.Úpy0ÚnumberÚpy2Úpy4r   Úpy6Úpy8zassert %(py10)sÚpy10N©ú==)za%(py2)s
{%(py2)s = %(py0)s.num_str
} == %(py8)s
{%(py8)s = %(py6)s
{%(py6)s = %(py4)s.lower
}()
})r   Únum_strÚlowerÚ
@pytest_arÚ_call_reprcompareÚ@py_builtinsÚlocalsÚ_should_repr_global_nameÚ	_safereprÚAssertionErrorÚ_format_explanation)r   r   Ú@py_assert1Ú@py_assert5Ú@py_assert7Ú@py_assert3Ú@py_format9Ú@py_format11s   &       Ú>C:\Users\brusi\Desktop\python\one_offs\sigfigs\test_sigfigs.pyÚtest_valid_numbersr      sµ   € ô( �s‹^€FØ�>‰>Ð(ŸY™YÐ(˜Y›[Ð(˜[Ñ(×(×(×(Ô(ˆ>×(×(×(×(×(×(ˆ6×(×(×(Ò(ˆ6×(×(Ö(ˆ>×(×(×(×(×(Ö(˜S×(×(×(Ò(˜S×(×(Ö(˜Y×(×(Ô(˜[×(×(×(×(×(×(×(Ö(ó    c                óš   € \         P                  ! \        4      ;_uu_ 4        \        V 4       RRR4       R#   + '       g   i     R# ; i)z!Reject malformed numeric strings.N©ÚpytestÚraisesÚ
ValueErrorr   ©r   s   &r   Útest_invalid_numbersr'      s)   € ô4 
�Š”z×	"Õ	"Ü�#Œ÷ 
#×	"×	"Ò	"úó	   £9¹A
	c            	     óä  € \        R4      p V P                  pRq!V8H  q3'       gÇ   \        P                  ! R
V3RW34      RR\        P
                  ! 4       9   g   \        P                  ! V 4      '       d   \        P                  ! V 4      MRR\        P                  ! V4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR	;p;r2R	# )z(Normalize uppercase scientific notation.ú1.50E+3z1.50e+3r   r   r   Úpy5zassert %(py7)sÚpy7Nr   )z/%(py2)s
{%(py2)s = %(py0)s.num_str
} == %(py5)s©
r   r   r   r   r   r   r   r   r   r   )r   r   Ú@py_assert4r   Ú@py_format6Ú@py_format8s         r   Ú%test_uppercase_exponent_is_lowercasedr1   <   s~   € ä�yÓ!€FØ�>‰>Ð&˜YÐ&˜YÑ&×&×&×&Ó&ˆ>×&×&×&×&×&×&ˆ6×&×&×&Ò&ˆ6×&×&Ö&ˆ>×&×&Ô&˜Y×&×&×&×&×&×&×&Ô&r    c           	     óL  € \        V 4      pVP                  q"V 8H  q3'       gÿ   \        P                  ! R	V3R
W 34      RR\        P
                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      RR\        P
                  ! 4       9   g   \        P                  ! V 4      '       d   \        P                  ! V 4      MR/,          pRRV/,          p\        \        P                  ! V4      4      hR;r#R# )z=Preserve significant trailing zeros in the normalized string.r   r   r   r   r   zassert %(py6)sr	   Nr   )z/%(py2)s
{%(py2)s = %(py0)s.num_str
} == %(py4)sr-   )r   r   r   r   Ú@py_format5Ú@py_format7s   &     r   Ú/test_valid_input_preserves_digit_representationr5   B   s‘   € ô �s‹^€FØ�>‰>Ð ˜SÑ × × × Ó ˆ>× × × × × × ˆ6× × × Ò ˆ6× × Ö ˆ>× × × × × Ö ˜S× × × Ò ˜S× × × × × × × Ô r    c                óš   € \         P                  ! \        4      ;_uu_ 4        \        V 4       RRR4       R#   + '       g   i     R# ; i)z:Reject surrounding whitespace unless explicitly supported.Nr"   r&   s   &r   Útest_whitespace_is_rejectedr7   Q   s)   € ô 
�Š”z×	"Õ	"Ü�#Œ÷ 
#×	"×	"Ò	"úr(   )Ú1500Ú42Ú0z12.34ú0.00420ú1.5e3r*   z2e-4z-12.3z+4.2e5z-3.2E-4z0.5z10.01)Ú z.5z.0042z5.z1.Ú.Ú1ez1e+z1e-z1.2.3Ú12abcÚabc12z1 500z--12z++12Ú1ee3ÚnanÚinfz1.2e3.4)r8   r<   z1.50e3r;   )z 12.3z12.3 z 12.3 )Úbuiltinsr   Ú_pytest.assertion.rewriteÚ	assertionÚrewriter   r#   Úsigfigsr   ÚmarkÚparametrizer   r'   r1   r5   r7   © r    r   Ú<module>rM      sÀ   ðß  „ ƒå ð ‡�×ÑØ	òóñ$)ó%ð$)ð ‡�×ÑØ	òóñ0ó1ð0ò'ð ‡�×ÑØ	òóñ!óð!ð ‡�×ÑØ	òóñóòr    