
    ik                     N    d dl mZ d dlZddlmZ 	  G d d      Z G d d      Zy)	    )print_functionN   )YAMLc                   r    e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zy)TestNoIndentc                     t               }d}d}|j                  |j                  |            }t        |       ||dz   k(  sJ y )N%!PS-Adobe-2.0z$
        --- |
          {}
        
r   loadformatprintselfyamlsinpds        u/var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/srsly/tests/ruamel_yaml/test_literal.py+test_root_literal_scalar_indent_example_9_5z8TestNoIndent.test_root_literal_scalar_indent_example_9_5   D    v IIcjjm$aAH}}    c                     t               }d}d}|j                  |j                  |            }t        |       ||dz   k(  sJ y )N
testing123"
        --- |
        {}
        r
   r   r   s        r   "test_root_literal_scalar_no_indentz/TestNoIndent.test_root_literal_scalar_no_indent*   D    v IIcjjm$aAH}}r   c                     t               }d}d}|j                  |j                  |            }t        |       ||dz   k(  sJ y )Nr   z4
        %YAML 1.1
        --- |
        {}
        r
   r   r   s        r   &test_root_literal_scalar_no_indent_1_1z3TestNoIndent.test_root_literal_scalar_no_indent_1_15   sD    v
 IIcjjm$aAH}}r   c                     ddl m} ddlm} d}d} | ||j	                  |                  }t        |       ||dz   k(  sJ y )Nr   )dedent)	safe_loadr   z6
        %YAML 1.1
        --- |
          {}
        r
   )textwrapr!   srsly.ruamel_yamlr"   r   r   )r   r!   r"   r   r   r   s         r   0test_root_literal_scalar_no_indent_1_1_old_stylez=TestNoIndent.test_root_literal_scalar_no_indent_1_1_old_styleA   sD    #/
 fSZZ]+,aAH}}r   c                 p    t               }d|_        d}	 d}|j                  |j                  |             y )NTr   zD
            %YAML 1.1
            --- |
            {}
            )r   1root_level_block_style_scalar_no_indent_error_1_1r   r   )r   r   r   r   s       r   /test_root_literal_scalar_no_indent_1_1_no_raisez<TestNoIndent.test_root_literal_scalar_no_indent_1_1_no_raiseO   s8     vAE>C
 IIcjjm$r   c                     t               }d}d}|j                  |j                  |            }t        |       ||dz   k(  sJ y )Nr   z$
        --- |1
         {}
        r
   r   r   s        r   *test_root_literal_scalar_indent_offset_onez7TestNoIndent.test_root_literal_scalar_indent_offset_one^   r   r   c                     t               }d}d}|j                  |j                  |            }t        |       ||dz   k(  sJ y )Nr   z'
        --- |4
            {}
        r
   r   r   s        r   +test_root_literal_scalar_indent_offset_fourz8TestNoIndent.test_root_literal_scalar_indent_offset_fouri   r   r   c                     t               }d}d}|j                  |j                  |            }t        |       ||dz   dz  k(  sJ y )Nz testing123z8
        --- |4
            {s}
            {s}
        )r   r
      r   r   s        r   8test_root_literal_scalar_indent_offset_two_leading_spacezETestNoIndent.test_root_literal_scalar_indent_offset_two_leading_spacet   sL    v
 IIcjj1jo&aQXN"""r   c                     t               }d}d}|j                  |j                  |            }t        |       ||dz   k(  sJ y )Nr	   r   r
   r   r   s        r   *test_root_literal_scalar_no_indent_specialz7TestNoIndent.test_root_literal_scalar_no_indent_special   r   r   c                     t               }d}d}|j                  |j                  |            }t        |       ||dz   k(  sJ y )Nr	   z$
        --- >
          {}
        r
   r   r   s        r   test_root_folding_scalar_indentz,TestNoIndent.test_root_folding_scalar_indent   r   r   c                     t               }d}d}|j                  |j                  |            }t        |       ||dz   k(  sJ y )Nr   "
        --- >
        {}
        r
   r   r   s        r   "test_root_folding_scalar_no_indentz/TestNoIndent.test_root_folding_scalar_no_indent   r   r   c                     t               }d}d}|j                  |j                  |            }t        |       ||dz   k(  sJ y )Nr	   r5   r
   r   r   s        r   *test_root_folding_scalar_no_indent_specialz7TestNoIndent.test_root_folding_scalar_no_indent_special   r   r   c                     t        dd      }d}d}d}t        |j                  |j                  ||                  D ]  \  }}t	        d|       ddg|   |k(  rJ  y )	NsafeT)typpureabcklmz<
        --- |-
        {}
        --- |
        {}
        zd1:zklm
)r   	enumerateload_allr   r   )r   r   s1s2r   idxd1s          r   test_root_literal_multi_docz(TestNoIndent.test_root_literal_multi_doc   so    T* !szz"b/A!BC 	/GC%7#C(B...	/r   c                 L    t               }d|_        d}|j                  |       y )NTzT
        --- |-
          %YAML 1.3
          ---
          this: is a test
        r   explicit_start
round_tripr   r   r   s      r   +test_root_literal_doc_indent_directives_endz8TestNoIndent.test_root_literal_doc_indent_directives_end   &    v" 	r   c                 L    t               }d|_        d}|j                  |       y )NTzI
        --- |-
          some more
          ...
          text
        rG   rJ   s      r   )test_root_literal_doc_indent_document_endz6TestNoIndent.test_root_literal_doc_indent_document_end   rL   r   c                     t               }d|_        d}|j                  |      }t        t	        |      t        |             |j                  |       y )NTz<
        --- |2
           some more
          text
        r   rH   r   r   typereprrI   r   r   r   r   s       r   #test_root_literal_doc_indent_markerz0TestNoIndent.test_root_literal_doc_indent_marker   sE    v"
 IIcNd1gtAwr   c                     t               }d|_        d}|j                  |      }t        t	        |      t        |             |j                  |       y )NTzG
        ---
        a: |2
           some more
          text
        rP   rS   s       r   %test_nested_literal_doc_indent_markerz2TestNoIndent.test_nested_literal_doc_indent_marker   sE    v" IIcNd1gtAwr   N)__name__
__module____qualname__r   r   r   r%   r(   r*   r,   r/   r1   r3   r6   r8   rE   rK   rN   rT   rV    r   r   r   r      sW    		
%		
#				/		
r   r   c                   <    e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
y	)
Test_RoundTripLiteralc                     t               }d|_        d}d}|j                  |      }|j                  |      }|j	                  ||       y )NTr   r   comparer   rH   r   r   dumpr   r   r   ysr   s        r   %test_rt_root_literal_scalar_no_indentz;Test_RoundTripLiteral.test_rt_root_literal_scalar_no_indent   I    v" YYq\IIbM		!R	 r   c                     t               }d|_        d|_        d}d}|j                  |      }|j	                  |      }|j                  ||       y )NT   r   z&
        --- |
            {}
        r^   r   rH   indentr   r   ra   rb   s        r   "test_rt_root_literal_scalar_indentz8Test_RoundTripLiteral.test_rt_root_literal_scalar_indent   P    v" YYq\IIbM		!R	 r   c                     t               }d|_        d|_        d}d}|j                  |      }|j	                  |      }|j                  ||       y )NTr   r    
        ---
        {}
        r^   rh   rb   s        r   #test_rt_root_plain_scalar_no_indentz9Test_RoundTripLiteral.test_rt_root_plain_scalar_no_indent  rk   r   c                     t               }d|_        d|_        d}d}|j                  |      }|j	                  |      }|j                  ||       y )NTrg   r   $
        ---
            {}
        r^   rh   rb   s        r   %test_rt_root_plain_scalar_expl_indentz;Test_RoundTripLiteral.test_rt_root_plain_scalar_expl_indent  rk   r   c                     t               }d|_        d|_        d}d}|j                  |      }|j	                  |      }|j                  ||       y )NTrg   z'testing: 123'rp   r^   rh   rb   s        r   "test_rt_root_sq_scalar_expl_indentz8Test_RoundTripLiteral.test_rt_root_sq_scalar_expl_indent  sP    v" YYq\IIbM		!R	 r   c                     t               }d|_        d|_        d}d}|j                  |      }|j	                  |      }|j                  ||       y )NTr   z"'testing123"rm   r^   rh   rb   s        r   "test_rt_root_dq_scalar_expl_indentz8Test_RoundTripLiteral.test_rt_root_dq_scalar_expl_indent+  sR     v" YYq\IIbM		!R	 r   c                     t               }d|_        d}d}|j                  |      }|j                  |      }|j	                  ||       y )NTr   z#
        --- |-
        {}
        r^   r`   rb   s        r   ,test_rt_root_literal_scalar_no_indent_no_eolzBTest_RoundTripLiteral.test_rt_root_literal_scalar_no_indent_no_eol:  re   r   c                     t               }d}d}|j                  |      }|j                  |      }|j                  ||       y )Nr   z"
        - |
          {}
        r^   )r   r   r   ra   rb   s        r   test_rt_non_root_literal_scalarz5Test_RoundTripLiteral.test_rt_non_root_literal_scalarF  sA    v YYq\IIbM		!R	 r   N)rW   rX   rY   rd   rj   rn   rq   rs   ru   rw   ry   rZ   r   r   r\   r\      s*    
!!!!!!
!	!r   r\   )
__future__r   pytest	roundtripr   r   r\   rZ   r   r   <module>r}      s,    %  *I IXe! e!r   