o
    
 ¢i:  ã                   @   s:   d dl Z ddlmZmZmZmZ dd„ ZG dd„ dƒZdS )é    Né   )Ú
round_tripÚdedentÚround_trip_loadÚround_trip_dumpc                 C   s   t t| ƒƒS )N)r   r   )Ús© r   úY/home/ubuntu/.local/lib/python3.10/site-packages/srsly/tests/ruamel_yaml/test_line_col.pyÚload   s   r
   c                   @   sD   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dS )ÚTestLineColc                 C   ó4   t dƒ}|d jjdksJ ‚|d jjdksJ ‚d S )NzR
            - a
            - e
            - [b, d]
            - c
            é   ©r
   ÚlcÚlineÚcol©ÚselfÚdatar   r   r	   Útest_item_00   ó
   ÿzTestLineCol.test_item_00c                 C   r   )NzR
            - a
            - e
            - {x: 3}
            - c
            r   r   r   r   r   r	   Útest_item_01   r   zTestLineCol.test_item_01c                 C   r   )NzX
            - a
            - e
            - !!set {x, y}
            - c
            r   r   r   r   r   r	   Útest_item_02%   r   zTestLineCol.test_item_02c                 C   r   )Nz|
            - a
            - e
            - !!omap
              - x: 1
              - y: 3
            - c
            r   r   r   r   r   r	   Útest_item_031   ó
   ÿ
zTestLineCol.test_item_03c                 C   s\   t dƒ}|d jjdksJ ‚|d jjdksJ ‚|d jjdks"J ‚|d jjdks,J ‚d S )Nzä
         # testing line and column based on SO
         # http://stackoverflow.com/questions/13319067/
         - key1: item 1
           key2: item 2
         - key3: another item 1
           key4: another item 2
            r   r   r   é   r   r   r   r   r	   Útest_item_04?   s   ÿ
zTestLineCol.test_item_04c                 C   s4   t dƒ}|j d¡dksJ ‚|j d¡dksJ ‚d S )Nz_
        a: 1
        b: 2
        c: 3
        # comment
        klm: 42
        d: 4
        Úklm)r   r   )r   é   )r
   r   ÚkeyÚvaluer   r   r   r	   Útest_pos_mappingO   r   zTestLineCol.test_pos_mappingc                 C   s    t dƒ}|j d¡dksJ ‚d S )Nz[
        - a
        - b
        - c
        # next one!
        - klm
        - d
        é   )r   r   )r
   r   Úitemr   r   r   r	   Útest_pos_sequence]   s   ÿ
zTestLineCol.test_pos_sequenceN)
Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r!   r$   r   r   r   r	   r      s    r   )ÚpytestÚ	roundtripr   r   r   r   r
   r   r   r   r   r	   Ú<module>   s   