$62 GRAYBYTE WORDPRESS FILE MANAGER $46

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/python34/lib64/python3.4/unittest/__pycache__/

HOME
Current File : /opt/alt/python34/lib64/python3.4/unittest/__pycache__//util.cpython-34.pyc
�
j f5�@s
dZddlmZmZddlmZdZdZdZdZ	dZ
dZee	eeee
Zedks|t
�dd	�Zd
d�Zdd
d�Zdd�Zdd�Zdd�Zdd�Zedd�Zdd�Zdd�Zdd�ZdS) zVarious utility functions.�)�
namedtuple�OrderedDict)�commonprefixT�P��cCsXt|�||}|tkrTd|d|�||t|�|d�f}n|S)Nz%s[%d chars]%s)�len�_PLACEHOLDER_LEN)�s�	prefixlenZ	suffixlen�skip�r
�2/opt/alt/python34/lib64/python3.4/unittest/util.py�_shortens4rcs�ttt|��}ttt|��}|tkr:|St|��t���t|�tt}|t	kr�ttt	|�tks�t
�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�VqdS)N)r�
_MIN_DIFF_LEN�_MIN_END_LEN)rr
)rrr
rr*s)�tuple�map�	safe_repr�maxr�_MAX_LENGTHr�_MIN_BEGIN_LENr	�_MIN_COMMON_LEN�AssertionErrorr)�args�maxlenZ
common_lenr
)rrr�_common_shorten_reprs  rFcCscyt|�}Wn!tk
r3tj|�}YnX|sMt|�tkrQ|S|dt�dS)Nz [truncated]...)�repr�	Exception�object�__repr__rr)�objZshort�resultr
r
rr-s
rcCsd|j|jfS)Nz%s.%s)�
__module__�__name__)�clsr
r
r�strclass6sr)cCsod}}g}g}xLy||}||}||krw|j|�|d7}x�|||krs|d7}qVWn�||kr�|j|�|d7}x|||kr�|d7}q�Wn^|d7}z%x|||kr�|d7}q�WWd|d7}x|||kr|d7}q�WXWqtk
r`|j||d��|j||d��PYqXqW||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_difference9s:










r5cCs\g}xI|rQ|j�}y|j|�Wq	tk
rM|j|�Yq	Xq	W||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+)r.r/r2�itemr
r
r�unorderable_list_differencebs	
r: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}x�t|�D]�\}}	|	|krlqNnd}
}x>t||�D]-}|||	kr�|
d7}
|||<q�q�Wx=t|�D]/\}}
|
|	kr�|d7}|||<q�q�W|
|krNt|
||	�}|j|�qNqNWx�t|�D]�\}}	|	|krTq6nd}x>t||�D]-}|||	krj|d7}|||<qjqjWtd||	�}|j|�q6W|S)zHReturns list of (cnt_act, cnt_exp, elem) triples where the counts differrr*)�listrr"�	enumerate�range�	_Mismatchr+)r/r.r
�t�m�nZNULLr%r0�elem�cnt_s�cnt_tr1Z
other_elem�diffr
r
r�_count_diff_all_purposeys<	



rIcCs8t�}x(|D] }|j|d�d||<qW|S)z@Return dict of element counts, in the order they were first seenrr*)r�get)�iterable�crEr
r
r�_ordered_count�s	
rMc	Cs�t|�t|�}}g}xZ|j�D]L\}}|j|d�}||kr,t|||�}|j|�q,q,WxH|j�D]:\}}||kr�td||�}|j|�q�q�W|S)zHReturns list of (cnt_act, cnt_exp, elem) triples where the counts differr)rM�itemsrJrAr+)	r/r.r
rBr%rErFrGrHr
r
r�_count_diff_hashable�srON)�__doc__�collectionsrrZos.pathrZ
__unittestrr	rrrrrrrrr)r5r:r=rArIrMrOr
r
r
r�<module>s,	)#


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
24 May 2024 8.33 AM
root / linksafe
0755
__init__.cpython-34.pyc
2.838 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
__init__.cpython-34.pyo
2.838 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
__main__.cpython-34.pyc
0.456 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
__main__.cpython-34.pyo
0.456 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
case.cpython-34.pyc
49.984 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
case.cpython-34.pyo
49.926 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
loader.cpython-34.pyc
12.481 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
loader.cpython-34.pyo
12.356 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
main.cpython-34.pyc
7.311 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
main.cpython-34.pyo
7.311 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
mock.cpython-34.pyc
63.509 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
mock.cpython-34.pyo
63.509 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
result.cpython-34.pyc
7.548 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
result.cpython-34.pyo
7.548 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
runner.cpython-34.pyc
7.212 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
runner.cpython-34.pyo
7.212 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
signals.cpython-34.pyc
2.336 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
signals.cpython-34.pyo
2.336 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
suite.cpython-34.pyc
9.745 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
suite.cpython-34.pyo
9.745 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
util.cpython-34.pyc
5.127 KB
17 Apr 2024 5.10 PM
root / linksafe
0644
util.cpython-34.pyo
5.05 KB
17 Apr 2024 5.10 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF