Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_iterlen.cpython-311.opt-2.pyc |
�
�Keb � � � d dl Z d dlmZ d dlmZ d dlmZ dZ G d� d� � Z G d� d e� � Z G d
� dee j
� � Z G d� d
ee j
� � Z G d� dee j
� � Z
G d� dee j
� � Z G d� de e j
� � Z G d� de e j
� � Z G d� de e j
� � Z G d� de e j
� � Z G d� de e j
� � Z G d� de e j
� � Z G d� dee j
� � Z G d � d!ee j
� � Z G d"� d#e� � Z G d$� d%e� � Z G d&� d'e� � Z G d(� d)e j
� � Zed*k r e j � � dS dS )+� N)�repeat)�deque)�length_hint�
c � � e Zd Zd� ZdS )�TestInvariantWithoutMutationsc � � | j }t t dt dz � � � � D ]4}| � t |� � |� � t
|� � �5| � t |� � d� � | � t t |� � | � t |� � d� � d S �N� r ) �it�reversed�range�n�assertEqualr �next�assertRaises�
StopIteration)�selfr �is �;/usr/local/apps/python3/lib/python3.11/test/test_iterlen.py�test_invariantz,TestInvariantWithoutMutations.test_invariant6 s� � �
�W���%��1�Q�3�-�-�(�(� � �A����[��_�_�a�0�0�0���H�H�H�H�����R���!�,�,�,����-��r�2�2�2�����R���!�,�,�,�,�,� N)�__name__�
__module__�__qualname__r � r r r r 4 s# � � � � � �-� -� -� -� -r r c � � e Zd Zd� ZdS )�TestTemporarilyImmutablec � � | j }| � t |� � t � � t |� � | � t |� � t dz
� � | � � � | � t t |� � | � t |� � d� � d S r
)r r r r r �mutater �RuntimeError)r r s r �test_immutable_during_iterationz8TestTemporarilyImmutable.test_immutable_during_iterationA s� � � �W������R���!�,�,�,��R��������R���!�A�#�.�.�.����
�
�
����,��b�1�1�1�����R���!�,�,�,�,�,r N)r r r r"