Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/test/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/test/__pycache__/test_iterlen.cpython-39.opt-2.pyc

a

��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)�TestInvariantWithoutMutationscCsh|j}ttdtd��D]}|�t|�|�t|�q|�t|�d�|�tt|�|�t|�d�dS�N�r)	�it�reversed�range�n�assertEqualr�next�assertRaises�
StopIteration)�selfr	�i�r�-/usr/local/lib/python3.9/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�dSr)r	r
rrr�mutater�RuntimeError)rr	rrr�test_immutable_during_iterationAsz8TestTemporarilyImmutable.test_immutable_during_iterationN)rrrrrrrrr?src@seZdZdd�ZdS)�
TestRepeatcCstdt�|_dS�N)rrr	�rrrr�setUpQszTestRepeat.setUpN�rrrr rrrrrOsrc@seZdZdd�ZdS)�
TestXrangecCsttt��|_dSr��iterrrr	rrrrr VszTestXrange.setUpNr!rrrrr"Tsr"c@seZdZdd�ZdS)�TestXrangeCustomReversedcCsttt��|_dSr�r
rrr	rrrrr [szTestXrangeCustomReversed.setUpNr!rrrrr%Ysr%c@seZdZdd�ZdS)�	TestTuplecCstttt���|_dSr)r$�tuplerrr	rrrrr `szTestTuple.setUpNr!rrrrr'^sr'c@seZdZdd�ZdS)�	TestDequecCs"ttt��}t|�|_|j|_dSr)rrrr$r	�popr�r�drrrr gs
zTestDeque.setUpNr!rrrrr)esr)c@seZdZdd�ZdS)�TestDequeReversedcCs"ttt��}t|�|_|j|_dSr)rrrr
r	r*rr+rrrr ns
zTestDequeReversed.setUpNr!rrrrr-lsr-c@seZdZdd�ZdS)�TestDictKeyscCs$t�tt��}t|�|_|j|_dSr)�dict�fromkeysrrr$r	�popitemrr+rrrr us
zTestDictKeys.setUpNr!rrrrr.ssr.c@seZdZdd�ZdS)�
TestDictItemscCs(t�tt��}t|���|_|j|_dSr)	r/r0rrr$�itemsr	r1rr+rrrr |szTestDictItems.setUpNr!rrrrr2zsr2c@seZdZdd�ZdS)�TestDictValuescCs(t�tt��}t|���|_|j|_dSr)	r/r0rrr$�valuesr	r1rr+rrrr �szTestDictValues.setUpNr!rrrrr4�sr4c@seZdZdd�ZdS)�TestSetcCs"ttt��}t|�|_|j|_dSr)�setrrr$r	r*rr+rrrr �s
z
TestSet.setUpNr!rrrrr6�sr6c@seZdZdd�Zdd�ZdS)�TestListcCsttt��|_dSrr#rrrrr �szTestList.setUpcCs�ttt��}t|�}t|�t|�|�t|�td�|�t�|�t|�td�g|dd�<|�t|�d�|�t|�g�|�td��|�t|�d�dS�N�rr�)	�listrrr$rr
r�append�extend�rr,r	rrr�
test_mutation�s
zTestList.test_mutationN�rrrr r@rrrrr8�sr8c@seZdZdd�Zdd�ZdS)�TestListReversedcCsttt��|_dSrr&rrrrr �szTestListReversed.setUpcCs�ttt��}t|�}t|�t|�|�t|�td�|�t�|�t|�td�g|dd�<|�t|�d�|�t|�g�|�td��|�t|�d�dSr9)	r<rrr
rr
rr=r>r?rrrr@�s
zTestListReversed.test_mutationNrArrrrrB�srBc@seZdZdd�Zdd�ZdS)�BadLencCsttd��S�Nr�r$rrrrr�__iter__�szBadLen.__iter__cCstd��dS�NZhello�rrrrr�__len__�szBadLen.__len__N)rrrrFrIrrrrrC�srCc@seZdZdd�Zdd�ZdS)�
BadLengthHintcCsttd��SrDrErrrrrF�szBadLengthHint.__iter__cCstd��dSrGrHrrrr�__length_hint__�szBadLengthHint.__length_hint__N�rrrrFrKrrrrrJ�srJc@seZdZdd�Zdd�ZdS)�NoneLengthHintcCsttd��SrDrErrrrrF�szNoneLengthHint.__iter__cCstSr)�NotImplementedrrrrrK�szNoneLengthHint.__length_hint__NrLrrrrrM�srMc@seZdZdd�Zdd�ZdS)�TestLengthHintExceptionscCsx|�ttt��|�ttt��|�tgjt��|�tgjt��ttd��}|�t|jt��|�t|jt��dSrD)rrr<rCrJr>�	bytearrayr)r�brrr�test_issue1242657�sz*TestLengthHintExceptions.test_issue1242657cCs|�tt��ttd���dSrD)r
r<rMrrrrr�test_invalid_hint�sz*TestLengthHintExceptions.test_invalid_hintN)rrrrRrSrrrrrO�s	rO�__main__)Zunittest�	itertoolsr�collectionsr�operatorrrrrZTestCaserr"r%r'r)r-r.r2r4r6r8rB�objectrCrJrMrOr�mainrrrr�<module>,s0	


Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists