Psyduck - 可達鴨 之 鴨力山大2


Server : LiteSpeed
System : Linux premium217.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User : alloknri ( 880)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /opt/alt/python38/lib64/python3.8/unittest/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python38/lib64/python3.8/unittest/__pycache__/util.cpython-38.pyc
U

i�f_�@s�dZddlmZmZddlmZdZdZdZdZ	dZ
dZee	eeee
Zedks\t
�dd	�Zd
d�Zdd
d�Zdd�Zdd�Zdd�Zdd�Zedd�Zdd�Zdd�ZdS)zVarious utility functions.�)�
namedtuple�Counter)�commonprefixT�P��cCsBt|�||}|tkr>d|d|�||t|�|d�f}|S)Nz%s[%d chars]%s)�len�_PLACEHOLDER_LEN)�s�	prefixlenZ	suffixlen�skip�r
�2/opt/alt/python38/lib64/python3.8/unittest/util.py�_shortens&rcs�ttt|��}ttt|��}|tkr(|St|��t���t|�tt}|t	kr�ttt	|�tkspt
�t�t|��t��fdd�|D��St�tt	��t��fdd�|D��S)Nc3s|]}�|�d�VqdS�Nr
��.0r
��prefixrr
r�	<genexpr>'sz'_common_shorten_repr.<locals>.<genexpr>c3s&|]}�t|�d�tt�VqdSr)r�
_MIN_DIFF_LEN�_MIN_END_LENrrr
rr*s�)�tuple�map�	safe_repr�maxr�_MAX_LENGTHr�_MIN_BEGIN_LENr	�_MIN_COMMON_LEN�AssertionErrorr)�args�maxlenZ
common_lenr
rr�_common_shorten_reprs*�
���r"FcCsPzt|�}Wntk
r*t�|�}YnX|r<t|�tkr@|S|dt�dS)Nz [truncated]...)�repr�	Exception�object�__repr__rr)�objZshort�resultr
r
rr-srcCsd|j|jfS)Nz%s.%s)�
__module__�__qualname__)�clsr
r
r�strclass6sr,cCsd}}g}g}z�||}||}||krT|�|�|d7}|||kr�|d7}q<nv||kr�|�|�|d7}|||kr�|d7}qnnD|d7}z|||kr�|d7}q�W5|d7}|||kr�|d7}q�XWqtk
�r|�||d��|�||d��Y�qYqXq||fS)arFinds elements in only one or the other of two, sorted input lists.

    Returns a two-element tuple of lists.    The first list contains those
    elements in the "expected" list but not in the "actual" list, and the
    second contains those elements in the "actual" list but not in the
    "expected" list.    Duplicate elements in either input list are ignored.
    r�N)�append�
IndexError�extend)�expected�actual�i�j�missingZ
unexpected�e�ar
r
r�sorted_list_difference9s8

r8cCsHg}|r@|��}z|�|�Wqtk
r<|�|�YqXq||fS)z�Same behavior as sorted_list_difference but
    for lists of unorderable items (like dicts).

    As it does a linear search per item (remove) it
    has O(n*n) performance.)�pop�remove�
ValueErrorr.)r1r2r5�itemr
r
r�unorderable_list_differencebsr=cCs||k||kS)z.Return -1 if x < y, 0 if x == y and 1 if x > yr
)�x�yr
r
r�
three_way_cmpssr@ZMismatchzactual expected valuecCs,t|�t|�}}t|�t|�}}t�}g}t|�D]�\}}	|	|krHq6d}
}t||�D] }|||	krZ|
d7}
|||<qZt|�D] \}}
|
|	kr�|d7}|||<q�|
|kr6t|
||	�}|�|�q6t|�D]X\}}	|	|kr�q�d}t||�D] }|||	kr�|d7}|||<q�td||	�}|�|�q�|S)�HReturns list of (cnt_act, cnt_exp, elem) triples where the counts differrr-)�listrr%�	enumerate�range�	_Mismatchr.)r2r1r
�t�m�nZNULLr(r3�elem�cnt_s�cnt_tr4Z
other_elem�diffr
r
r�_count_diff_all_purposeys<


rMc	Cs�t|�t|�}}g}|��D]2\}}|�|d�}||krt|||�}|�|�q|��D]&\}}||krZtd||�}|�|�qZ|S)rAr)r�items�getrEr.)	r2r1r
rFr(rIrJrKrLr
r
r�_count_diff_hashable�srPN)F)�__doc__�collectionsrrZos.pathrZ
__unittestrr	rrrrrrr"rr,r8r=r@rErMrPr
r
r
r�<module>s4
���
	)
#
Name
Size
Permissions
Options
__init__.cpython-38.opt-1.pyc
3.067 KB
-rw-r--r--
__init__.cpython-38.opt-2.pyc
1.348 KB
-rw-r--r--
__init__.cpython-38.pyc
3.067 KB
-rw-r--r--
__main__.cpython-38.opt-1.pyc
0.404 KB
-rw-r--r--
__main__.cpython-38.opt-2.pyc
0.372 KB
-rw-r--r--
__main__.cpython-38.pyc
0.404 KB
-rw-r--r--
async_case.cpython-38.opt-1.pyc
4.018 KB
-rw-r--r--
async_case.cpython-38.opt-2.pyc
4.018 KB
-rw-r--r--
async_case.cpython-38.pyc
4.1 KB
-rw-r--r--
case.cpython-38.opt-1.pyc
49.263 KB
-rw-r--r--
case.cpython-38.opt-2.pyc
34.474 KB
-rw-r--r--
case.cpython-38.pyc
49.315 KB
-rw-r--r--
loader.cpython-38.opt-1.pyc
14.105 KB
-rw-r--r--
loader.cpython-38.opt-2.pyc
11.483 KB
-rw-r--r--
loader.cpython-38.pyc
14.21 KB
-rw-r--r--
main.cpython-38.opt-1.pyc
7.372 KB
-rw-r--r--
main.cpython-38.opt-2.pyc
7.198 KB
-rw-r--r--
main.cpython-38.pyc
7.372 KB
-rw-r--r--
mock.cpython-38.opt-1.pyc
75.567 KB
-rw-r--r--
mock.cpython-38.opt-2.pyc
56.885 KB
-rw-r--r--
mock.cpython-38.pyc
75.567 KB
-rw-r--r--
result.cpython-38.opt-1.pyc
7.135 KB
-rw-r--r--
result.cpython-38.opt-2.pyc
5.59 KB
-rw-r--r--
result.cpython-38.pyc
7.135 KB
-rw-r--r--
runner.cpython-38.opt-1.pyc
6.866 KB
-rw-r--r--
runner.cpython-38.opt-2.pyc
6.266 KB
-rw-r--r--
runner.cpython-38.pyc
6.866 KB
-rw-r--r--
signals.cpython-38.opt-1.pyc
2.183 KB
-rw-r--r--
signals.cpython-38.opt-2.pyc
2.183 KB
-rw-r--r--
signals.cpython-38.pyc
2.183 KB
-rw-r--r--
suite.cpython-38.opt-1.pyc
9.717 KB
-rw-r--r--
suite.cpython-38.opt-2.pyc
8.725 KB
-rw-r--r--
suite.cpython-38.pyc
9.717 KB
-rw-r--r--
util.cpython-38.opt-1.pyc
4.271 KB
-rw-r--r--
util.cpython-38.opt-2.pyc
3.567 KB
-rw-r--r--
util.cpython-38.pyc
4.342 KB
-rw-r--r--