
    hC                     T    S r SSKrSSKrSSKJrJrJr   " S S5      r " S S5      rg)	zC
Testing copy and deepcopy, instigated by Issue 84 (Peter Amstutz)
    N   )dedentround_trip_loadround_trip_dumpc                   &    \ rS rSrS rS rS rSrg)TestDeepCopy   c                 X   [        S5      n[        U5      n[        R                  " U5      n[	        U5      n[        SR                  U5      5        [        SR                  U5      5        XA:X  d   eUR                  R                  5       UR                  R                  5       :X  d   eg )Nz&        {foo: bar, baz: quux}
        x [{}]y [{}])	r   r   copydeepcopyr   printformatfa
flow_styleselfxdata	data_copyys        [/home/james-whalen/.local/lib/python3.13/site-packages/srsly/tests/ruamel_yaml/test_copy.pytest_preserve_flow_style_simple,TestDeepCopy.test_preserve_flow_style_simple   s    

 q!MM$'	I&hooa !hooa !vvww!!#y||'>'>'@@@@    c                    [        S5      n[        U5      nUS   R                  R                  5       SL d   e[        R
                  " U5      nUS   R                  R                  5       SL d   eUS   R                  R                  5         US   R                  R                  5       US   R                  R                  5       :w  d   eUS   R                  R                  SL d   eUS   R                  R                  SL d   e[        U5      n[        SR                  U5      5        [        SR                  U5      5        U[        S5      :X  d   eg )N)        a: {foo: bar, baz: quux}
        aTFr   r   :        a:
          foo: bar
          baz: quux
        r   r   r   r   r   r   set_block_style_flow_styler   r   r   r   s        r   $test_deepcopy_flow_style_nested_dict1TestDeepCopy.test_deepcopy_flow_style_nested_dict   s7   

 q!Cy||&&(D000MM$'	~  ++-555#))+Cy||&&(IcN,=,=,H,H,JJJJCy||''4///~  ,,555I&hooa !hooa !F
 
 	
 
r   c                    [        S5      n[        U5      nUS   R                  R                  5       SL d   e[        R
                  " U5      nUS   R                  R                  5       SL d   eUS   R                  R                  5         US   R                  R                  5       US   R                  R                  5       :w  d   eUS   R                  R                  SL d   eUS   R                  R                  SL d   e[        U5      n[        SR                  U5      5        [        SR                  U5      5        U[        S5      :X  d   eg Nz        a: [1, 2, 3]
        r   TFr   r   z7        a:
        - 1
        - 2
        - 3
        r!   r   s        r   $test_deepcopy_flow_style_nested_list1TestDeepCopy.test_deepcopy_flow_style_nested_list7   s7   

 q!Cy||&&(D000MM$'	~  ++-555#))+Cy||&&(IcN,=,=,H,H,JJJJCy||''4///~  ,,555I&hooa !hooa !F
 
 	
 
r    N)__name__
__module____qualname____firstlineno__r   r$   r(   __static_attributes__r*   r   r   r   r      s    A
4
r   r   c                        \ rS rSrS rS rSrg)TestCopyS   c                 n   [        S5      n[        U5      nUS   R                  R                  5       SL d   e[        R                  " U5      nUS   R                  R                  5       SL d   eUS   R                  R                  5         US   R                  R                  5       US   R                  R                  5       :X  d   eUS   R                  R                  SL d   eUS   R                  R                  SL d   e[        U5      n[        U5      nXE:X  d   eU[        S5      :X  d   eg )Nr   r   TFr    )r   r   r   r   r   r"   r#   r   )r   r   r   r   r   zs         r    test_copy_flow_style_nested_dict)TestCopy.test_copy_flow_style_nested_dictT   s'   

 q!Cy||&&(D000IIdO	~  ++-555#))+Cy||&&(IcN,=,=,H,H,JJJJCy||''5000~  ,,555I&D!vvF
 
 	
 
r   c                    [        S5      n[        U5      nUS   R                  R                  5       SL d   e[        R                  " U5      nUS   R                  R                  5       SL d   eUS   R                  R                  5         US   R                  R                  5       US   R                  R                  5       :X  d   eUS   R                  R                  SL d   eUS   R                  R                  SL d   e[        U5      n[        SR                  U5      5        [        SR                  U5      5        U[        S5      :X  d   eg r'   )
r   r   r   r   r   r"   r#   r   r   r   r   s        r    test_copy_flow_style_nested_list)TestCopy.test_copy_flow_style_nested_listn   s6   

 q!Cy||&&(D000IIdO	~  ++-555#))+Cy||&&(IcN,=,=,H,H,JJJJCy||''5000~  ,,555I&hooa !hooa !F
 
 	
 
r   r*   N)r+   r,   r-   r.   r5   r8   r/   r*   r   r   r1   r1   S   s    
4
r   r1   )	__doc__r   pytest	roundtripr   r   r   r   r1   r*   r   r   <module>r=      s/      ? ?B
 B
J4
 4
r   