
    h                     R    S SK r SSKJrJrJr  S	S jr " S S5      r " S S5      rg)
    N   )dedent
round_tripround_trip_loadc                 T    SS K nUR                  R                  [        U 5      U5      $ )Nr   )srsly.ruamel_yamlruamel_yamlr   r   )sversionsrslys      ^/home/james-whalen/.local/lib/python3.13/site-packages/srsly/tests/ruamel_yaml/test_version.pyloadr      s"    ,,VAY@@    c                   ,    \ rS rSrS rS rS rS rSrg)TestVersions   c                     [        S5      nUS   S:X  d   eUS   S:X  d   eUS   S:X  d   eUS   S	:X  d   eUS
   S:X  d   eUS   S:X  d   eUS   S:X  d   eUS   S:X  d   eUS   SL d   eg )Nz        %YAML 1.2
        ---
        - 12:34:56
        - 012
        - 012345678
        - 0o12
        - on
        - off
        - yes
        - no
        - true
        r   12:34:56r         Na    
      on   off   yes   no   Tr   selfrs     r   test_explicit_1_2TestVersions.test_explicit_1_2   s    
 tz!!!trzztxtrzztt||tu}}tu}}tt||tt||r   c                     [        S5      nUS   S:X  d   eUS   S:X  d   eUS   S:X  d   eUS   S	:X  d   eUS
   SL d   eUS   SL d   eUS   SL d   eUS   SL d   eUS   SL d   eg )Nz        %YAML 1.1
        ---
        - 12:34:56
        - 012
        - 012345678
        - 0o12
        - on
        - off
        - yes
        - no
        - true
        r     r   r   r   	012345678r   0o12r   Tr   Fr   r    r"   r#   r$   s     r   test_explicit_1_1TestVersions.test_explicit_1_1)   s    
 tu}}trzzt{"""tv~~tt||tu}}tt||tu}}tt||r   c                     [        S5      nUS   S:X  d   eUS   S:X  d   eUS   S:X  d   eUS   S	:X  d   eUS
   S:X  d   eUS   S:X  d   eUS   S:X  d   eUS   S:X  d   eUS   S:X  d   eUS   SL d   eg )N        - 12:34:56
        - 12:34:56.78
        - 012
        - 012345678
        - 0o12
        - on
        - off
        - yes
        - no
        - true
        r   r   r   z12:34:56.78r   r   r   r   r   r   r   r   r   r   r    r   r"   r!   	   Tr#   r$   s     r   test_implicit_1_2TestVersions.test_implicit_1_2C   s    
 tz!!!t}$$$trzztxtrzztt||tu}}tu}}tt||tt||r   c                     Sn[        USS9nUS   S:X  d   eUS   S:X  d   eUS   S	:X  d   eUS
   S:X  d   eUS   S:X  d   eUS   SL d   eUS   SL d   eUS   SL d   eUS   SL d   eUS   SL d   eg )Nr0   z1.1)r   r   r*   r   g\@r   r   r   r+   r   r,   r   Tr   Fr    r"   r1   r#   )r%   inpr&   s      r   test_load_version_1_1"TestVersions.test_load_version_1_1]   s     e$tu}}txtrzzt{"""tv~~tt||tu}}tt||tu}}tt||r    N)	__name__
__module____qualname____firstlineno__r'   r-   r2   r6   __static_attributes__r8   r   r   r   r      s    444r   r   c                   ,    \ rS rSrS rS rS rS rSrg)TestIssue62w   c                 "   SS K n[        S5      n[        R                  " UR                  R
                  R                  5         [        UR                  S5      SS9  S S S 5        [        UR                  S5      SS9  g ! , (       d  f       N(= f)Nr   a          {}# Outside flow collection:
        - ::vector
        - ": - ()"
        - Up, up, and away!
        - -123
        - http://example.com/foo#bar
        # Inside flow collection:
        - [::vector, ": - ()", "Down, down and away!", -456, http://example.com/foo#bar]
        %YAML 1.1
---
Tpreserve_quotes 	r   r   pytestraisesr	   parserParserErrorr   formatr%   r   r
   s      r   test_00TestIssue62.test_00y   sj     	
 ]]5,,33??@qxx 23TJ A188B<6 A@   B  
Bc                 "   SS K n[        S5      n[        R                  " UR                  R
                  R                  5         [        UR                  S5      SS9  S S S 5        [        UR                  S5      SS9  g ! , (       d  f       N(= f)Nr   z        {}# Outside flow collection:
        - ::vector
        - ": - ()"
        - Up, up, and away!
        - -123
        - http://example.com/foo#bar
        - [::vector, ": - ()", "Down, down and away!", -456, http://example.com/foo#bar]
        rB   TrC   rE   rF   rL   s      r   test_00_single_comment"TestIssue62.test_00_single_comment   sj     

 ]]5,,33??@qxx 23TJ A188B<6 A@rO   c                 V   SS K n[        S5      n[        R                  " UR                  R
                  R                  5         [        UR                  S5      SS9  S S S 5        [        UR                  S5      SS9  [        UR                  S5      SSS	9  g ! , (       d  f       NB= f)
Nr   zC        {}[random plain value that contains a ? character]
        rB   TrC   rE   z%YAML 1.2
--- z1.2)rD   r   rF   rL   s      r   test_01TestIssue62.test_01   s     

 ]]5,,33??@qxx 23TJ A188B<6188-.eT	 A@s   B
B(c                     [        S5        g )Nz{"in":{},"out":{}})r   )r%   s    r   test_so_45681626TestIssue62.test_so_45681626   s    ,-r   r8   N)	r9   r:   r;   r<   rM   rQ   rT   rW   r=   r8   r   r   r?   r?   w   s    7&7&U.r   r?   )N)rG   	roundtripr   r   r   r   r   r?   r8   r   r   <module>rZ      s-     : :Af fR8. 8.r   