
    i                     P    d dl Z ddlmZmZmZ d	dZ G d d      Z G d d      Zy)
    N   )dedent
round_tripround_trip_loadc                 T    dd l }|j                  j                  t        |       |      S )Nr   )srsly.ruamel_yamlruamel_yamlr   r   )sversionsrslys      u/var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/srsly/tests/ruamel_yaml/test_version.pyloadr      s"    ,,VAY@@    c                   $    e Zd Zd Zd Zd Zd Zy)TestVersionsc                     t        d      }|d   dk(  sJ |d   dk(  sJ |d   dk(  sJ |d   d	k(  sJ |d
   dk(  sJ |d   dk(  sJ |d   dk(  sJ |d   dk(  sJ |d   du sJ y )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_2zTestVersions.test_explicit_1_2   s    
 tz!!!trzztxtrzztt||tu}}tu}}tt||tt||r   c                     t        d      }|d   dk(  sJ |d   dk(  sJ |d   dk(  sJ |d   d	k(  sJ |d
   du sJ |d   du sJ |d   du sJ |d   du sJ |d   du sJ y )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_1zTestVersions.test_explicit_1_1)   s    
 tu}}trzzt{"""tv~~tt||tu}}tt||tu}}tt||r   c                     t        d      }|d   dk(  sJ |d   dk(  sJ |d   dk(  sJ |d   d	k(  sJ |d
   dk(  sJ |d   dk(  sJ |d   dk(  sJ |d   dk(  sJ |d   dk(  sJ |d   du sJ y )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_2zTestVersions.test_implicit_1_2C   s    
 tz!!!t}$$$trzztxtrzztt||tu}}tu}}tt||tt||r   c                     d}t        |d      }|d   dk(  sJ |d   dk(  sJ |d   d	k(  sJ |d
   dk(  sJ |d   dk(  sJ |d   du sJ |d   du sJ |d   du sJ |d   du sJ |d   du sJ y )Nr-   z1.1)r   r   r(   r   g\@r   r   r   r)   r   r*   r   Tr   Fr   r!   r.   r"   )r$   inpr%   s      r   test_load_version_1_1z"TestVersions.test_load_version_1_1]   s     e$tu}}txtrzzt{"""tv~~tt||tu}}tt||tu}}tt||r   N)__name__
__module____qualname__r&   r+   r/   r2    r   r   r   r      s    444r   r   c                   $    e Zd Zd Zd Zd Zd Zy)TestIssue62c                 "   dd l }t        d      }t        j                  |j                  j
                  j                        5  t        |j                  d      d       d d d        t        |j                  d      d       y # 1 sw Y   &xY w)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_00zTestIssue62.test_00y   ss     	
 ]]5,,33??@ 	Kqxx 23TJ	K188B<6	K 	K   BBc                 "   dd l }t        d      }t        j                  |j                  j
                  j                        5  t        |j                  d      d       d d d        t        |j                  d      d       y # 1 sw Y   &xY w)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]
        r:   Tr;   r=   r>   rD   s      r   test_00_single_commentz"TestIssue62.test_00_single_comment   ss     

 ]]5,,33??@ 	Kqxx 23TJ	K188B<6	K 	KrF   c                 \   dd l }t        d      }t        j                  |j                  j
                  j                        5  t        |j                  d      d       d d d        t        |j                  d      d       t        |j                  d      dd	       y # 1 sw Y   CxY w)
Nr   zC        {}[random plain value that contains a ? character]
        r:   Tr;   r=   z%YAML 1.2
--- z1.2)r<   r   r>   rD   s      r   test_01zTestIssue62.test_01   s     

 ]]5,,33??@ 	Kqxx 23TJ	K188B<6188-.eT		K 	Ks   B""B+c                     t        d       y )Nz{"in":{},"out":{}})r   )r$   s    r   test_so_45681626zTestIssue62.test_so_45681626   s    ,-r   N)r3   r4   r5   rE   rH   rJ   rL   r6   r   r   r8   r8   w   s    7&7&U.r   r8   )N)r?   	roundtripr   r   r   r   r   r8   r6   r   r   <module>rN      s-     : :Af fR8. 8.r   