
    `N`8
                         d Z ddlZddlZddlmZ ddlmZ ddlmZ  G d dej                  Z	e
dk    r ej                     dS dS )	zTests for yapf.line_joiner.    N)line_joiner)style)yapf_test_helperc                   N    e Zd Zed             Zd Zd Zd Zd Zd Z	d Z
d Zd	S )
LineJoinerTestc                 P    t          j        t          j                               d S )N)r   SetGlobalStyleCreatePEP8Style)clss    :lib/python3.11/site-packages/yapftests/line_joiner_test.py
setUpClasszLineJoinerTest.setUpClass   s"    	.0011111    c                 ~    t          j        |          }|                     t          j        |          |           dS )zCheck that the given UnwrappedLines are joined as expected.

    Arguments:
      code: The code to check to see if we can join it.
      join_lines: True if we expect the lines to be joined.
    N)r   ParseAndUnwrapassertCodeEqualr   CanMergeMultipleLines)selfcode
join_linesuwliness       r   _CheckLineJoiningz LineJoinerTest._CheckLineJoining   s;     -d33G:7CCZPPPPPr   c                 \    t          j        d          }|                     |d           d S )Nz0        if isinstance(a, int): continue
        Tr   textwrapdedentr   r   r   s     r   testSimpleSingleLineStatementz,LineJoinerTest.testSimpleSingleLineStatement)   9    ?   D 	4D11111r   c                 \    t          j        d          }|                     |d           d S )Nz<        if isinstance(b, int):
            continue
        Fr   r   r   s     r   testSimpleMultipleLineStatementz.LineJoinerTest.testSimpleMultipleLineStatement/   s9    ?   D 	4E22222r   c                 \    t          j        d          }|                     |d           d S )NzX        if isinstance(c, int):
            while True:
                continue
        Fr   r   r   s     r   &testSimpleMultipleLineComplexStatementz5LineJoinerTest.testSimpleMultipleLineComplexStatement6   s9    ?   D
 	4E22222r   c                 \    t          j        d          }|                     |d           d S )NzR        if isinstance(d, int): continue  # We're pleased that d's an int.
        Tr   r   r   s     r   *testSimpleMultipleLineStatementWithCommentz9LineJoinerTest.testSimpleMultipleLineStatementWithComment>   r   r   c                 \    t          j        d          }|                     |d           d S )Nz3        if isinstance(e, int):    continue
        Tr   r   r   s     r   .testSimpleMultipleLineStatementWithLargeIndentz=LineJoinerTest.testSimpleMultipleLineStatementWithLargeIndentD   r   r   c                 \    t          j        d          }|                     |d           d S )Nzp        if instance(bbbbbbbbbbbbbbbbbbbbbbbbb, int): cccccccccccccccccccccccccc = ddddddddddddddddddddd
        Fr   r   r   s     r   testOverColumnLimitz"LineJoinerTest.testOverColumnLimitJ   s9    ?   D 	4E22222r   N)__name__
__module____qualname__classmethodr   r   r   r!   r#   r%   r'   r)    r   r   r   r      s        2 2 ;2Q Q Q2 2 23 3 33 3 32 2 22 2 23 3 3 3 3r   r   __main__)__doc__r   unittestyapf.yapflibr   r   	yapftestsr   YAPFTestr   r*   mainr.   r   r   <module>r6      s    " !   $ $ $ $ $ $       & & & & & &53 53 53 53 53%. 53 53 53p z(-///// r   