
    i                         d dl Z ddlmZmZmZmZ  G d d      Z G d d      Z G d d	      Z G d
 d      Z	 G d d      Z
y)    N   )
round_tripdedentround_trip_loadround_trip_dumpc                       e Zd Zej                  j                  d      d        Zd Zej                  j                  d      d        Zd Z	y)TestCommentFailuresTstrictc                     t        d       y )N
        # the beginning
        !!set
        # or this one?
        ? a
        # next one is B (lowercase)
        ? b  #  You see? Promised you.
        ? c
        # this is the end
        r   selfs    r/var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/srsly/tests/ruamel_yaml/test_fail.pytest_set_comment_before_tagz/TestCommentFailures.test_set_comment_before_tag   s     			
    c                 L    d}t        t        |            t        d      k(  sJ y )Nr   z
        !!set
        # or this one?
        ? a
        # next one is B (lowercase)
        ? b  #  You see? Promised you.
        ? c
        # this is the end
        r   r   r   r   inps     r   #test_set_comment_before_tag_no_failz7TestCommentFailures.test_set_comment_before_tag_no_fail   s3    	 s34
9
 

 
	
 

r   c                     t        d       y )N9
        - # abc
           a: 1
           b: 2
        r   r   s    r   test_comment_dash_linez*TestCommentFailures.test_comment_dash_line7   s    	
r   c                 P    d}t        |      }t        |      t        d      k(  sJ y )Nr   z7
          # abc
        - a: 1
          b: 2
        )r   r   r   )r   xdatas      r   test_comment_dash_line_failz/TestCommentFailures.test_comment_dash_line_failA   s8    
 q!t$)
 
 	
 
r   N)
__name__
__module____qualname__pytestmarkxfailr   r   r   r    r   r   r	   r	      sV    [[d#
 $

0 [[d#
 $

r   r	   c                   \    e Zd Zej                  j                  d      d        Zd Zd Zy)TestIndentFailuresTr
   c                     t        d       y )N9  
        verbosity: 1                  # 0 is minimal output, -1 none
        base_url: http://gopher.net
        special_indices: [1, 5, 8]
        also_special:
        - a
        - 19
        - 32
        asia and europe: &asia_europe
            Turkey: Ankara
            Russia: Moscow
        countries:
            Asia:
                <<: *asia_europe
                Japan: Tokyo # 東京
            Europe:
                <<: *asia_europe
                Spain: Madrid
                Italy: Rome
            Antarctica:
            -   too cold
        r   r   s    r   test_indent_not_retainedz+TestIndentFailures.test_indent_not_retainedS   s    	
r   c                 P    d}t        t        |      d      t        d      k(  sJ y )Nr*      indentu?  
        verbosity: 1                  # 0 is minimal output, -1 none
        base_url: http://gopher.net
        special_indices: [1, 5, 8]
        also_special:
        -   a
        -   19
        -   32
        asia and europe: &asia_europe
            Turkey: Ankara
            Russia: Moscow
        countries:
            Asia:
                <<: *asia_europe
                Japan: Tokyo # 東京
            Europe:
                <<: *asia_europe
                Spain: Madrid
                Italy: Rome
            Antarctica:
            -   too cold
        r   r   s     r    test_indent_not_retained_no_failz3TestIndentFailures.test_indent_not_retained_no_failn   s6    , s3A>&C
 
 	
 
r   c                 "    d}t        |d       y )Nz(
        -   a:
            - b
        r-   r.   r   r   s     r   Xtest_indent_top_level_no_failz1TestIndentFailures.Xtest_indent_top_level_no_fail   s     	3q!r   N)	r    r!   r"   r#   r$   r%   r+   r0   r2   r&   r   r   r(   r(   R   s1    [[d#
 $
4.
`"r   r(   c                   V    e Zd Zej                  j                  d      d        Zd Zy)TestTagFailuresTr
   c                     t        d       y )Nz^        !!map
        name: Anthon
        location: Germany
        language: python
        r   r   s    r   test_standard_short_tagz'TestTagFailures.test_standard_short_tag   s    	
r   c                 P    d}d}t        t        |            t        |      k(  sJ y )Nz_
        !!map
        name: Anthon
        location: Germany
        language: python
        zQ
        name: Anthon
        location: Germany
        language: python
        r   )r   r   exps      r   test_standard_short_tag_no_failz/TestTagFailures.test_standard_short_tag_no_fail   s.    
 s34sCCCr   N)r    r!   r"   r#   r$   r%   r6   r9   r&   r   r   r4   r4      s,    [[d#
 $
Dr   r4   c                       e Zd Zd Zd Zy)TestFlowValuesc                     d}t        |       y )Nz        {a: bcd:efg}
        r   r   s     r   test_flow_value_with_colonz)TestFlowValues.test_flow_value_with_colon   s     	3r   c                 "    d}t        |d       y )Nz        {a: 'bcd:efg'}
        Tpreserve_quotesr   r   s     r   !test_flow_value_with_colon_quotedz0TestFlowValues.test_flow_value_with_colon_quoted   s     	3-r   N)r    r!   r"   r=   rA   r&   r   r   r;   r;      s    .r   r;   c                   $    e Zd Zd Zd Zd Zd Zy)TestMappingKeyc                 $    d}t        |dd       y )N*        {a: 1, b: 2}: hello world
        TF)r@   	dump_datar   r   s     r   test_simple_mapping_keyz&TestMappingKey.test_simple_mapping_key   s     	3>r   c                 ^    ddl m}  |ddg      di}t        d      }t        |      |k(  sJ y )Nr   CommentedKeyMapar   b   zhello worldrE   )srsly.ruamel_yaml.commentsrJ   r   r   )r   rJ   dr8   s       r   test_set_simple_mapping_keyz*TestMappingKey.test_set_simple_mapping_key   s=    >h12MB

 q!S(((r   c                     ddl m} d}t        |d      }|j                   |ddg            | |dd	g      <   t	        d
      }t        |      |k(  sJ y )Nr   rI   rE   Tr?   rK   rM   )rN   r   )rL   rO   z*        {b: 1, a: 2}: hello world
        )rP   rJ   r   popr   r   r   rJ   r   rQ   r8   s        r   "test_change_key_simple_mapping_keyz1TestMappingKey.test_change_key_simple_mapping_key   sj    > C63455Xx014
/8X.
/0 

 q!S(((r   c                 |    ddl m} d}t        |d      } |ddg      di}t        d	      }t	        |      |k(  sJ y )
Nr   rI   rE   Tr?   rK   rM   goodbyez&        {a: 1, b: 2}: goodbye
        )rP   rJ   r   r   r   rU   s        r   $test_change_value_simple_mapping_keyz3TestMappingKey.test_change_value_simple_mapping_key   sR    > C6h12I>

 q!S(((r   N)r    r!   r"   rG   rR   rV   rY   r&   r   r   rC   rC      s    ?	))")r   rC   )r#   	roundtripr   r   r   r   r	   r(   r4   r;   rC   r&   r   r   <module>r[      sJ     K KA
 A
HQ" Q"hD D6. .0) 0)r   