
    iC                     T    d Z ddlZddlZddlmZmZmZ  G d d      Z G d d      Zy)	zC
Testing copy and deepcopy, instigated by Issue 84 (Peter Amstutz)
    N   )dedentround_trip_loadround_trip_dumpc                       e Zd Zd Zd Zd Zy)TestDeepCopyc                 T   t        d      }t        |      }t        j                  |      }t	        |      }t        dj                  |             t        dj                  |             ||k(  sJ |j                  j                         |j                  j                         k(  sJ y )Nz&        {foo: bar, baz: quux}
        x [{}]y [{}])	r   r   copydeepcopyr   printformatfa
flow_styleselfxdata	data_copyys        r/var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/srsly/tests/ruamel_yaml/test_copy.pytest_preserve_flow_style_simplez,TestDeepCopy.test_preserve_flow_style_simple   s    

 q!MM$'	I&hooa !hooa !Avvww!!#y||'>'>'@@@@    c                    t        d      }t        |      }|d   j                  j                         du sJ t	        j
                  |      }|d   j                  j                         du sJ |d   j                  j                          |d   j                  j                         |d   j                  j                         k7  sJ |d   j                  j                  du sJ |d   j                  j                  du sJ t        |      }t        dj                  |             t        dj                  |             |t        d      k(  sJ y )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_dictz1TestDeepCopy.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                    t        d      }t        |      }|d   j                  j                         du sJ t	        j
                  |      }|d   j                  j                         du sJ |d   j                  j                          |d   j                  j                         |d   j                  j                         k7  sJ |d   j                  j                  du sJ |d   j                  j                  du sJ t        |      }t        dj                  |             t        dj                  |             |t        d      k(  sJ y Nz        a: [1, 2, 3]
        r   TFr
   r   z7        a:
        - 1
        - 2
        - 3
        r   r   s        r   $test_deepcopy_flow_style_nested_listz1TestDeepCopy.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__r   r"   r%    r   r   r   r      s    A
4
r   r   c                       e Zd Zd Zd Zy)TestCopyc                 `   t        d      }t        |      }|d   j                  j                         du sJ t	        j                  |      }|d   j                  j                         du sJ |d   j                  j                          |d   j                  j                         |d   j                  j                         k(  sJ |d   j                  j                  du sJ |d   j                  j                  du sJ t        |      }t        |      }||k(  sJ |t        d      k(  sJ y )Nr   r   TFr   )r   r   r   r   r   r    r!   r   )r   r   r   r   r   zs         r    test_copy_flow_style_nested_dictz)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!AvvF
 
 	
 
r   c                    t        d      }t        |      }|d   j                  j                         du sJ t	        j                  |      }|d   j                  j                         du sJ |d   j                  j                          |d   j                  j                         |d   j                  j                         k(  sJ |d   j                  j                  du sJ |d   j                  j                  du sJ t        |      }t        dj                  |             t        dj                  |             |t        d      k(  sJ y r$   )
r   r   r   r   r   r    r!   r   r   r   r   s        r    test_copy_flow_style_nested_listz)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   N)r&   r'   r(   r.   r0   r)   r   r   r+   r+   S   s    
4
r   r+   )	__doc__r   pytest	roundtripr   r   r   r   r+   r)   r   r   <module>r4      s/      ? ?B
 B
J4
 4
r   