
    h                     @    S SK Jr  S SKrS SKr\4S jr " S S5      rg)    )print_functionNc                    SS K nSU -  n[        SU -  [        U5      5        [        R                  " U5      n[        US   U5      (       d   eUR                  R                  X2R                  R                  5      n[        U5        US   $ )Nr   z{"low": %s }zinput: [%s]low)	srsly.ruamel_yamlprintreprjsonloads
isinstanceruamel_yamlloadRoundTripLoader)stypsrslyxresret_vals         c/home/james-whalen/.local/lib/python3.13/site-packages/srsly/tests/ruamel_yaml/test_json_numbers.pyr   r   
   sy    !A	-1
tAw'
**Q-Cc%j#&&&&$$Q(9(9(I(IJG	'N5>    c                        \ rS rSrS rS rSrg)TestJSONNumbers   c                     S SR                  5        5        H.  nU(       d  M  [        U5      n[        U[        5      (       a  M.   e   g )Nc              3   f   #    U  H'  nUR                  S 5      S   R                  5       v   M)     g7f#r   Nsplitstrip.0ys     r   	<genexpr>9TestJSONNumbers.test_json_number_float.<locals>.<genexpr>   s3      

 GGCLO!!##   /1z
        1.0  # should fail on YAML spec on 1-9 allowed as single digit
        -1.0
        1e-06
        3.1e-5
        3.1e+5
        3.1e5  # should fail on YAML spec: no +- after e
        )
splitlinesr   r   floatselfr   r   s      r   test_json_number_float&TestJSONNumbers.test_json_number_float   sJ    

 JL

A q'Cc5))))

r   c                     S SR                  5        5        H3  nU(       d  M  [        U[        5      n[        U[        5      (       a  M3   e   g )Nc              3   f   #    U  H'  nUR                  S 5      S   R                  5       v   M)     g7fr   r   r!   s     r   r$   7TestJSONNumbers.test_json_number_int.<locals>.<genexpr>0   s3      
 GGCLO!!##r&   z
        42
        )r'   r   intr   r)   s      r   test_json_number_int$TestJSONNumbers.test_json_number_int/   sJ    
JL
A q#,Cc3''''
r    N)__name__
__module____qualname____firstlineno__r+   r1   __static_attributes__r3   r   r   r   r      s    *"
(r   r   )
__future__r   pytestr	   r(   r   r   r3   r   r   <module>r;      s$    &    
"( "(r   