Sindbad~EG File Manager

Current Path : /proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/
Upload File :
Current File : //proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/bisect_cmd.cpython-312.opt-2.pyc

�

&Μg^���	ddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	d�Z
d�Zd�Zd�Z
d�Zdd�Zd�Zd	�Zed
k(re�yy)�Nc��t|d�5}|D]}t||���|j�ddd�y#1swYyxYw)N�w)�file)�open�print�flush)�filename�tests�fp�names    �,/usr/local/lib/python3.12/test/bisect_cmd.py�write_testsrs7��	
�h��	���D��$�R� ��
���
�
�	�	�s	�%;�Ac�X�|sytdt|��d|���t||�|S)NzWriting z tests into )r�lenr)r	r
s  r
�write_outputr&s(����	��E�
�H�
=�>���%� ��O�c�$�dj|�S)N� )�join)�argss r
�format_shell_argsr.s���8�8�D�>�rc���tjg}|jtj��|jtj
��|jd�|S)N)z-X�faulthandler)�sys�
executable�extend�
subprocess�_args_from_interpreter_flags�"_optim_args_from_interpreter_flags)�cmds r
�
python_cmdr!2sJ���>�>�
�C��J�J�z�6�6�8�9��J�J�z�<�<�>�?��J�J�%�&��Jrc�t�t�}|jgd��|j|j�tj|tj
d��}|j}|r1t|�}td|�d|���tj|�|jj�}|S)N)�-m�testz--list-casesT)�stdout�universal_newlineszFailed to list tests: z failed with exit code )
r!r�	test_argsr�run�PIPE�
returncoderrr�exitr%�
splitlines)rr �proc�exitcoder
s     r
�
list_casesr/:s���
�,�C��J�J�-�.��J�J�t�~�~���>�>�#�!+���-1�3�D����H����$��
��h� �	!�������K�K�"�"�$�E��Lrc��tj�}	t||�t�}|j	dddd|g�|j	|j
�t
dt|�z�tjj�tjj�tj|�}|jtj j#|�rtj$|�SS#tj j#|�rtj$|�wwxYw)Nz-ur#r$z--matchfilez+ %s)�tempfile�mktemprr!rr'rrrr%r�stderrrr(r*�os�path�exists�unlink)rr
�
huntrleaks�tmpr r-s      r
�	run_testsr:Ks���
�/�/�
�C���C����l���
�
�D�$��
�s�;�<��
�
�4�>�>�"�
�f�(��-�-�.��
�
�����
�
�����~�~�c�"�����
�7�7�>�>�#���I�I�c�N���2�7�7�>�>�#���I�I�c�N��s�B:D�7D=c��tj�}|jddd��|jddd��|jdd	td
d��|jd
dtdd��|j	�\}}||_|S)Nz-iz--inputzUTest names produced by --list-tests written into a file. If not set, run --list-tests)�helpz-oz--outputzResult of the bisectionz-nz--max-tests�z:Maximum number of tests to stop the bisection (default: 1))�type�defaultr<z-Nz
--max-iter�dz5Maximum number of bisection iterations (default: 100))�argparse�ArgumentParser�add_argument�int�parse_known_argsr')�parserrr's   r
�
parse_argsrG_s���
�
$�
$�
&�F�
����i�I��J�����j�6��8�
����m�#�q�,��-�����l��c�.��/�
�-�-�/�O�D�)��D�N��Krc��t�}dD]*}||jvs�td|�d��t��,|jr<t	|j�5}|D�cgc]}|j���}}ddd�nt
|�}tdt�z�tdt|j�z�td|j�d|j�d��t|j|�}t�tj�}d	}	t|�|jkD�r||jk�rt|�}t|d
zd	�}t!j"||�}	td|�d|j�d
t|	��dt|����t�t%||	�}
td|�dt|����td|
�|
r$td�|	}t|j|�}ntd�t�|d	z
}t|�|jkDr||jkr��tdt|�z�|D]}td|z��t�|rtd|z�t)j*tj�|z
�}t|�|jkr&td|�dt-j.|�����ytd|�dt-j.|�����t1j2d	�ycc}w#1swY���xYw#t&$r#t�td�t�Y��&wxYw)N)z-wz--rerunz
--verbose2z	WARNING: z% option should not be used to bisect!zStart bisection with %s testszTest arguments: %sz!Bisection will stop when getting z1 or less tests (-n/--max-tests option), or after z" iterations (-N/--max-iter option)r=�z[+] Iteration �/z: run z tests/zran r+z*Tests failed: continuing with this subtestz;Tests succeeded: skipping this subtest, trying a new subsetzBisection interrupted!zTests (%s):z* %szOutput written into %szBisection completed in z iterations and )�secondszBisection failed after )rGr'r�inputr�stripr/rr�	max_tests�max_iterr�output�time�	monotonic�max�random�sampler:�KeyboardInterrupt�math�ceil�datetime�	timedeltarr+)
r�optr�liner
rP�
start_time�	iteration�ntest�subtestsr.r$�dts
             r
�mainrbss����<�D�.���$�.�.� ��I�c�U�"G�H�I��G�/�
�z�z�
�$�*�*�
��.0�1�b�d�T�Z�Z�\�b�E�1��
��4� ��	�
)�C��J�
6�7�	�
�!2�4�>�>�!B�
B�C�	��^�^�T�]�]�,�-��$�+�+�u�
-�F�	�G����!�J��I���%�j�4�>�>�)�i�4�=�=�.H���J�E����
�A�&�E��}�}�U�E�2�H��N�9�+�Q�t�}�}�o�>��X���w�s�5�z�l�<�
=��G� ��x�0�H��u�c�%�j�9�:��&�(�#���B�C� ��%�d�k�k�5�9���S�T��G���N�I�)�%�j�4�>�>�)�i�4�=�=�.H�4
�-�#�e�*�
$�%���
�f�t�m���	�G�
�
�&��/�0�	
���4�>�>�#�j�0�	1�B�
�5�z�T�^�^�#�
��H�.�.�r�:�<�	=�	��H�.�.�r�:�<�	=�������s2��
��L��
��
�&�'�
���s1�M� L<�7M�"D/M�<M�M�(M:�9M:�__main__)N)rArY�os.pathr4rWrTrrr1rQrrrr!r/r:rGrb�__name__�rr
�<module>rgse���$����
��
��������"�(�(B�J�z���F�r

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