HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //proc/thread-self/root/usr/local/lib/python3.7/test/__pycache__/test_iterlen.cpython-37.opt-2.pyc
B

��gb�@s�ddlZddlmZddlmZddlmZdZGdd�d�ZGdd	�d	e�Z	Gd
d�deej
�ZGdd
�d
eej
�ZGdd�deej
�Z
Gdd�deej
�ZGdd�de	ej
�ZGdd�de	ej
�ZGdd�de	ej
�ZGdd�de	ej
�ZGdd�de	ej
�ZGdd�de	ej
�ZGdd�deej
�ZGd d!�d!eej
�ZGd"d#�d#e�ZGd$d%�d%e�ZGd&d'�d'e�ZGd(d)�d)ej
�Zed*k�r�e��dS)+�N)�repeat)�deque)�length_hint�
c@seZdZdd�ZdS)�TestInvariantWithoutMutationscCsl|j}x2ttdtd��D]}|�t|�|�t|�qW|�t|�d�|�tt|�|�t|�d�dS)N�r)	�it�reversed�range�n�assertEqualr�next�assertRaises�
StopIteration)�selfr�i�r�-/usr/local/lib/python3.7/test/test_iterlen.py�test_invariant6sz,TestInvariantWithoutMutations.test_invariantN)�__name__�
__module__�__qualname__rrrrrr4src@seZdZdd�ZdS)�TestTemporarilyImmutablecCs\|j}|�t|�t�t|�|�t|�td�|��|�tt|�|�t|�d�dS)Nrr)rrrrr
�mutater�RuntimeError)rrrrr�test_immutable_during_iterationAsz8TestTemporarilyImmutable.test_immutable_during_iterationN)rrrrrrrrr?src@seZdZdd�ZdS)�
TestRepeatcCstdt�|_dS)N)rrr)rrrr�setUpQszTestRepeat.setUpN)rrrrrrrrrOsrc@seZdZdd�ZdS)�
TestXrangecCsttt��|_dS)N)�iterr
rr)rrrrrVszTestXrange.setUpN)rrrrrrrrrTsrc@seZdZdd�ZdS)�TestXrangeCustomReversedcCsttt��|_dS)N)r	r
rr)rrrrr[szTestXrangeCustomReversed.setUpN)rrrrrrrrr Ysr c@seZdZdd�ZdS)�	TestTuplecCstttt���|_dS)N)r�tupler
rr)rrrrr`szTestTuple.setUpN)rrrrrrrrr!^sr!c@seZdZdd�ZdS)�	TestDequecCs"ttt��}t|�|_|j|_dS)N)rr
rrr�popr)r�drrrrgs
zTestDeque.setUpN)rrrrrrrrr#esr#c@seZdZdd�ZdS)�TestDequeReversedcCs"ttt��}t|�|_|j|_dS)N)rr
rr	rr$r)rr%rrrrns
zTestDequeReversed.setUpN)rrrrrrrrr&lsr&c@seZdZdd�ZdS)�TestDictKeyscCs$t�tt��}t|�|_|j|_dS)N)�dict�fromkeysr
rrr�popitemr)rr%rrrrus
zTestDictKeys.setUpN)rrrrrrrrr'ssr'c@seZdZdd�ZdS)�
TestDictItemscCs(t�tt��}t|���|_|j|_dS)N)	r(r)r
rr�itemsrr*r)rr%rrrr|szTestDictItems.setUpN)rrrrrrrrr+zsr+c@seZdZdd�ZdS)�TestDictValuescCs(t�tt��}t|���|_|j|_dS)N)	r(r)r
rr�valuesrr*r)rr%rrrr�szTestDictValues.setUpN)rrrrrrrrr-�sr-c@seZdZdd�ZdS)�TestSetcCs"ttt��}t|�|_|j|_dS)N)�setr
rrrr$r)rr%rrrr�s
z
TestSet.setUpN)rrrrrrrrr/�sr/c@seZdZdd�Zdd�ZdS)�TestListcCsttt��|_dS)N)rr
rr)rrrrr�szTestList.setUpcCs�ttt��}t|�}t|�t|�|�t|�td�|�t�|�t|�td�g|dd�<|�t|�d�|�t|�g�|�td��|�t|�d�dS)N�rr�)	�listr
rrr
rr�append�extend)rr%rrrr�
test_mutation�s
zTestList.test_mutationN)rrrrr7rrrrr1�sr1c@seZdZdd�Zdd�ZdS)�TestListReversedcCsttt��|_dS)N)r	r
rr)rrrrr�szTestListReversed.setUpcCs�ttt��}t|�}t|�t|�|�t|�td�|�t�|�t|�td�g|dd�<|�t|�d�|�t|�g�|�td��|�t|�d�dS)Nr2rrr3)	r4r
rr	r
rrr5r6)rr%rrrrr7�s
zTestListReversed.test_mutationN)rrrrr7rrrrr8�sr8c@seZdZdd�Zdd�ZdS)�BadLencCsttd��S)Nr)rr
)rrrr�__iter__�szBadLen.__iter__cCstd��dS)N�hello)r)rrrr�__len__�szBadLen.__len__N)rrrr:r<rrrrr9�sr9c@seZdZdd�Zdd�ZdS)�
BadLengthHintcCsttd��S)Nr)rr
)rrrrr:�szBadLengthHint.__iter__cCstd��dS)Nr;)r)rrrr�__length_hint__�szBadLengthHint.__length_hint__N)rrrr:r>rrrrr=�sr=c@seZdZdd�Zdd�ZdS)�NoneLengthHintcCsttd��S)Nr)rr
)rrrrr:�szNoneLengthHint.__iter__cCstS)N)�NotImplemented)rrrrr>�szNoneLengthHint.__length_hint__N)rrrr:r>rrrrr?�sr?c@seZdZdd�Zdd�ZdS)�TestLengthHintExceptionscCsx|�ttt��|�ttt��|�tgjt��|�tgjt��ttd��}|�t|jt��|�t|jt��dS)Nr)rrr4r9r=r6�	bytearrayr
)r�brrr�test_issue1242657�sz*TestLengthHintExceptions.test_issue1242657cCs|�tt��ttd���dS)Nr)rr4r?r
)rrrr�test_invalid_hint�sz*TestLengthHintExceptions.test_invalid_hintN)rrrrDrErrrrrA�s	rA�__main__)Zunittest�	itertoolsr�collectionsr�operatorrrrrZTestCaserrr r!r#r&r'r+r-r/r1r8�objectr9r=r?rAr�mainrrrr�<module>,s0