
    [j9                        d dl mZ d dlmZ d dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ ddZddZddZ	 dddZdd dZdS )!    )annotations)Iterator)saferepr)_AssertionTextDiffStyle)_HighlightFunc)dummy_highlighter)assert_neverleftstrrighthighlighterr   verboseintassertion_text_diff_styler   returnIterator[str]c              #     K   |xdk    r t          | |          E d {V  d S xdk    r t          | |||          E d {V  d S }t          |           d S )Nblockndiff)_diff_text_block
_diff_textr	   )r
   r   r   r   r   unreachables         b/var/www/app.qaans.com/backend/venv/lib/python3.11/site-packages/_pytest/assertion/compare_text.py_compare_eq_textr      s       $WWWW'e44444444444WWWW!${GDDDDDDDDDDD%%%%%    c              #  v   K   dV  t          |           E d {V  dV  dV  t          |          E d {V  d S )NzLeft: zRight:)_format_text_block_lines)r
   r   s     r   r   r      sg      
MMM'---------
HHH
NNN'...........r   textc              #  H   K   |                      d          D ]	}d| V  
d S )N
  )split)r   lines     r   r   r   $   s@      

4    4kk r   c              #    K   ddl m} |dk     rd}t          t          t	          |           t	          |                              D ]}| |         ||         k    r n|dk    r!|dz  }d| dV  | |d         } ||d         }t	          |           t	          |          k    r^t          t	          |                     D ]}| |          ||          k    r n|dk    r#|dz  }d| d	V  | d|          } |d|          }d
}|                                 s|                                r<t          t          |                     } t          t          |                    }dV   |d                    d  ||	                    |          | 	                    |                    D                       d          	                                E d{V  dS )zYield the explanation for the diff between text.

    Unless --verbose is used this will skip leading and trailing
    characters which are identical to keep the diff minimal.
    r   )r      *   
   z	Skipping z5 identical leading characters in diff, use -v to showNz6 identical trailing characters in diff, use -v to showTz;Strings contain only whitespace, escaping them using repr()r!   c              3  @   K   | ]}|                     d           V  dS )r!   N)strip).0r$   s     r   	<genexpr>z_diff_text.<locals>.<genexpr>Q   sB       
 
 JJt
 
 
 
 
 
r   diff)lexer)
difflibr   rangeminlenisspacereprr   join
splitlines)r
   r   r   r   r   ikeependss          r   r   r   )   s]      {{s3t99c%jj1122 	 	AAw%("" #r66GAVaVVVVVV8D!""IEt99E

""3t99%%  8uaRy((E )2vvR9 9 9 9   CaRCycrc
H||~~ L LCIISZZ  KKKK {		 
 
e..x88$//(:S:STT
 
 
 	
 	
    jll        r   termc              #    K   |                     |           }|d |         }||t          |           z   d          }||z   }t          ||t          |          }t	          | d           dV  |D ]W}|                    d          r|                    d          r.|                    d          rd|dd          z   V  S|V  Xd S )	Nr'   )maxsizez is contained here:Skippingz- z+ r"      )findr2   r   r   r   
startswith)	r9   r   r   indexheadtailcorrect_textr-   r$   s	            r   _notin_textrD   Y   s      IIdOOE<DD		!##$D$;LdL*;WEEDdB'''
<
<
<<<<  ??:&& 	??4   	??4   	abb/!!!!JJJJ r   N)r
   r   r   r   r   r   r   r   r   r   r   r   )r
   r   r   r   r   r   )r   r   r   r   )r   )
r
   r   r   r   r   r   r   r   r   r   )r9   r   r   r   r   r   r   r   )
__future__r   collections.abcr   _pytest._io.safereprr   _pytest.assertion._typingr   r   _pytest.assertion.highlightr   _pytest.compatr	   r   r   r   r   rD    r   r   <module>rL      s   " " " " " " $ $ $ $ $ $ ) ) ) ) ) ) = = = = = = 4 4 4 4 4 4 9 9 9 9 9 9 ' ' ' ' ' '& & & & / / / /    HI- - - - -`      r   