File: D:/Python311/Lib/test/__pycache__/test_sort.cpython-311.pyc
�
��Vc�7 � � � d dl mZ d dlZd dlZd dlmZ ej Zd add�Z G d� dej � � Z
G d� dej � � Z G d � d
ej � � Zd� Z
G d� d
ej � � Zedk r ej � � dS dS )� )�supportN��
cmp_to_keyc �� � t rt d| � � |d d � }|r$|� t |� � �� � n|� � � t |� � t |� � k rtt d| � � t dt |� � t |� � � � t |� � t |� � t |� � t
dz
ad S t
|� � D ]m\ }}|| }||ur\t d| � � t d|||� � t |� � t |� � t |� � t
dz
a d S �nd S )Nz checking��keyzerror inzlength mismatch;� zout of order at index)�verbose�print�sortr �len�nerrors� enumerate)�tag�expected�raw�compare�orig�i�good�maybes �"D:\Python311\Lib\test\test_sort.py�checkr
sj � � � #�
�n�c�"�"�"��q�q�q�6�D�� ����Z��(�(��)�)�)�)����
�
�
�
�8�}�}��C��� � �
�j�#����
� �#�h�-�-��S���:�:�:�
�h����
�d����
�c�
�
�
��1������X�&�&� � ���4��A����u�� ��*�c�"�"�"��)�1�d�E�:�:�:��(�O�O�O��$�K�K�K��#�J�J�J��q�L�G��F�F� � � � c � � e Zd Zd� ZdS )�TestBasec �� �
�� dg}t dd� � D ]0}d|z }|� t |dz
|dz � � � � �1|� g d�� � G �
fd�dt � � �
G d� d t � � �|D �]_}t t |� � � � }t rt d
|� � |d d � }t
d||� � |d d � }|� � � t
d||� � |d d � }t j |� � t
d
||� � |d d � }|� � � |d d � }t
d||d� � � t rt d� � t d� � |d d � }|�
t d� � � �� � t
d||� � t |� � dk r/d� }|d d � }| �
t |j
|�� � �
fd�|D � � }|d d � }t j |� � d�
_ d} |�
� � n# t $ r d}Y nw xY w|rd�
_ t
d||� � �fd�t |� � D � � }d� |D � � } | �
� � d� | D � � }t
d||� � ��ad S )Nr r �
� )r �d i� c �* �� e Zd ZdZd� Z� fd�Zd� ZdS )�+TestBase.testStressfully.<locals>.ComplainsTc � � || _ d S �N�r )�selfr s r �__init__z4TestBase.testStressfully.<locals>.Complains.__init__6 s
� �����r c � �� �j r6t j � � dk rt rt d| |� � t �| j |j k S )Ng����MbP?z complaining at)�maybe_complain�randomr
r �RuntimeErrorr )r&