%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3.12/test/libregrtest/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3.12/test/libregrtest/__pycache__/cmdline.cpython-312.pyc

�

3�+g+\���ddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
dZdZdZ
Gd�d	ej�ZGd
�dej�ZGd�d
ej"�ZGd�dej"�Zd�Zd�Zd�Zd�Zd�Zy)�N)�	os_helper�)�
ALL_RESOURCES�RESOURCE_NAMES�
TestFilterz�python -m test [options] [test_name1 [test_name2 ...]]
python path/to/Lib/test/regrtest.py [options] [test_name1 [test_name2 ...]]
a`Run Python regression tests.

If no arguments or options are provided, finds all files matching
the pattern "test_*" in the Lib/test subdirectory and runs
them in alphabetical order (but see -M and -u, below, for exceptions).

For more rigorous testing, it is useful to use the following
command line:

python -E -Wd -m test [options] [test_name1 ...]
a�Additional option details:

-r randomizes test execution order. You can use --randseed=int to provide an
int seed value for the randomizer. The randseed value will be used
to set seeds for all random usages in tests
(including randomizing the tests order if -r is set).
By default we always set random seed, but do not randomize test order.

-s On the first invocation of regrtest using -s, the first test file found
or the first test file given on the command line is run, and the name of
the next test is recorded in a file named pynexttest.  If run from the
Python build directory, pynexttest is located in the 'build' subdirectory,
otherwise it is located in tempfile.gettempdir().  On subsequent runs,
the test in pynexttest is run, and the next test is written to pynexttest.
When the last test has been run, pynexttest is deleted.  In this way it
is possible to single step through the test files.  This is useful when
doing memory analysis on the Python interpreter, which process tends to
consume too many resources to run the full regression test non-stop.

-S is used to continue running tests after an aborted run.  It will
maintain the order a standard run (ie, this assumes -r is not used).
This is useful after the tests have prematurely stopped for some external
reason and you want to start running from where you left off rather
than starting from the beginning.

-f reads the names of tests from the file given as f's argument, one
or more test names per line.  Whitespace is ignored.  Blank lines and
lines beginning with '#' are ignored.  This is especially useful for
whittling down failures involving interactions among tests.

-L causes the leaks(1) command to be run just before exit if it exists.
leaks(1) is available on Mac OS X and presumably on some other
FreeBSD-derived systems.

-R runs each test several times and examines sys.gettotalrefcount() to
see if the test appears to be leaking references.  The argument should
be of the form stab:run:fname where 'stab' is the number of times the
test is run to let gettotalrefcount settle down, 'run' is the number
of times further it is run and 'fname' is the name of the file the
reports are written to.  These parameters all have defaults (5, 4 and
"reflog.txt" respectively), and the minimal invocation is '-R :'.

-M runs tests that require an exorbitant amount of memory. These tests
typically try to ascertain containers keep working when containing more than
2 billion objects, which only works on 64-bit systems. There are also some
tests that try to exhaust the address space of the process, which only makes
sense on 32-bit systems with at least 2Gb of memory. The passed-in memlimit,
which is a string in the form of '2.5Gb', determines how much memory the
tests will limit themselves to (but they may go slightly over.) The number
shouldn't be more memory than the machine has (including swap memory). You
should also keep in mind that swap memory is generally much, much slower
than RAM, and setting memlimit to all available RAM or higher will heavily
tax the machine. On the other hand, it is no use running these tests with a
limit of less than 2.5Gb, and many require more than 20Gb. Tests that expect
to use more than memlimit memory will be skipped. The big-memory tests
generally run very, very long.

-u is used to specify which special resource intensive tests to run,
such as those requiring large file support or network connectivity.
The argument is a comma-separated list of words indicating the
resources to test.  Currently only the following are defined:

    all -       Enable all special resources.

    none -      Disable all special resources (this is the default).

    audio -     Tests that use the audio device.  (There are known
                cases of broken audio drivers that can crash Python or
                even the Linux kernel.)

    curses -    Tests that use curses and will modify the terminal's
                state and output modes.

    largefile - It is okay to run some test that may create huge
                files.  These tests can take a long time and may
                consume >2 GiB of disk space temporarily.

    network -   It is okay to run tests that use external network
                resource, e.g. testing SSL support for sockets.

    decimal -   Test the decimal module against a large suite that
                verifies compliance with standards.

    cpu -       Used for certain CPU-heavy tests.

    walltime -  Long running but not CPU-bound tests.

    subprocess  Run all tests for the subprocess module.

    urlfetch -  It is okay to download files required on testing.

    gui -       Run tests that require a running GUI.

    tzdata -    Run tests that require timezone data.

To enable all resources except one, use '-uall,-<resource>'.  For
example, to run all the tests except for the gui tests, give the
option '-uall,-gui'.

--matchfile filters tests using a text file, one pattern per line.
Pattern examples:

- test method: test_stat_attributes
- test class: FileTests
- test identifier: test_os.FileTests.test_stat_attributes
c� ��eZdZd�fd�Z�xZS)�	Namespacec�F��d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_g|_d|_d|_d|_d|_d|_d|_ d|_!d|_"d|_#d|_$d|_%d|_&tO�|��di|��y)NFr�coverageT�))�ci�testdir�verbose�quiet�exclude�cleanup�wait�
list_cases�
list_tests�single�	randomize�fromfile�fail_env_changed�
use_resources�trace�coverdir�runleaks�
huntrleaks�rerun�verbose3�
print_slow�random_seed�use_mp�forever�header�failfast�match_tests�pgo�pgo_extended�tsan�worker_json�start�timeout�memlimit�	threshold�
fail_rerun�tempdir�_add_python_opts�xmlpath�super�__init__)�self�kwargs�	__class__s  ��//usr/lib/python3.12/test/libregrtest/cmdline.pyr5zNamespace.__init__�s+��������������
���������	���������������
� %���!�����
�"��
���
�7;�����
���
������������������
�')������!�����	������
������
���������� $������
���"�6�"�)�returnN)�__name__�
__module__�__qualname__r5�
__classcell__�r8s@r9r	r	�s
���)#�)#r:r	c���eZdZ�fd�Z�xZS)�
_ArgParserc�*��t�|�|dz�y)Nz%
Pass -h or --help for complete help.)r4�error)r6�messager8s  �r9rDz_ArgParser.error�s���
��
�g� H�H�Ir:)r<r=r>rDr?r@s@r9rBrB�s���J�Jr:rBc��eZdZdd�Zy)�FilterActionNc�j�t||j�}|j||jf�y�N)�getattr�dest�append�const)r6�parser�	namespace�value�
option_string�itemss      r9�__call__zFilterAction.__call__�s'���	�4�9�9�-��
���e�T�Z�Z�(�)r:rI�r<r=r>rSrr:r9rGrG�s��*r:rGc��eZdZdd�Zy)�FromFileFilterActionNc���t||j�}t|d��5}|D]-}|j|j	�|j
f��/	ddd�y#1swYyxYw)Nzutf-8)�encoding)rJrK�openrL�striprM)r6rNrOrPrQrR�fp�lines        r9rSzFromFileFilterAction.__call__�s]���	�4�9�9�-��
�%�'�
*�	9�b��
9�����d�j�j�l�D�J�J�7�8�
9�	9�	9�	9�s�3A!�!A*rIrTrr:r9rVrV�s��9r:rVc	�	�tdtttdtj
��}|j
g��d}|jd�}|jddd	d
��|jdd
d��|jdd
d��|jddd��|jdd
d��|jdddd|z��|jdddd��|jdd d!td"�#�|jd$�}|jd%d&d'd(��|jd)d*d
d+��|jd,d
d-d.�/�|jd0d1d
d2��|jd3d4d
d5��|jd6d7d
d8d9�/�|jd:d
d;��|jd<�}|jd=d>d
d?|z��|jd@dAdBdC|z��|jdDdEd
dF��|jdGdHd
dI|z��|jdJdKdLdMtdNdO�P�|jdQdRdLdMtddS�P�|jdTdUdMtdNdV�P�|jdWdUdMtddX�P�|jdYdZd
d[��|jd\d]d^d_td`|z�a�|jdbdcddde|z��|jdfdgtdh�i�|jdj�}|jdkdld
dm|z��|jdndodptdq|z�i�|jdrdsdtdutdv�#�|jdwdxd
dydz�/�|jd{d|dgtd}�i�|jd~dd�dd�d����|jd�d�d�td��i�|jd�d�d
d���|jd�d�d
d���|jd�d
d���|jd�d
d���|jd�d�d�d
d����|jd�d
d���|jd�d�d
d����|jd�d
d���|jd�d
d���|jd�d�dUd����|jd�d�d���|jd�d
d���|jd�d
d���|jd�d�d�d����|S)�Nzregrtest.pyF)�prog�usage�description�epilog�add_help�formatter_class)r'z-  See the section at bottom for more details.zGeneral optionsz-hz--help�helpzshow this help message and exit)�actionrdz	--fast-ci�
store_truez<Fast Continuous Integration (CI) mode used by GitHub Actionsz	--slow-ciz>Slow Continuous Integration (CI) mode used by buildbot workersz	--timeout�TIMEOUTzxdump the traceback and exit if a test takes more than TIMEOUT seconds; disabled if TIMEOUT is negative or equals to zero)�metavarrdz--waitz:wait for user input, e.g., allow a debugger to be attachedz-Sz--start�STARTz'the name of the test at which to start.z-pz--python�PYTHONz-Command to run Python test subprocesses with.z
--randseed�SEEDr"zpass a global random seed)rhrK�typerd�	Verbosityz-vz	--verbose�countz/run tests in verbose mode with output to stdoutz-wz--rerunz#re-run failed tests in verbose modez
--verbose2rzdeprecated alias to --rerun)rerKrdz-Wz
--verbose3zdisplay test output on failurez-qz--quietz'no output unless one or more tests failz-oz	--slowestr!zprint the slowest 10 testsz--headerz"print header with interpreter infozSelecting testsz-rz--randomizezrandomize test execution order.z-fz
--fromfile�FILEz'read names of tests to run from a file.z-xz	--excludez arguments are tests to *exclude*z-sz--singlez#single step through a set of tests.z-mz--match�PATr'Tz2match test cases and methods with glob pattern PAT)rhrKrerMrdz-iz--ignorez3ignore test cases and methods with glob pattern PATz--matchfile�FILENAMEzJsimilar to --match but get patterns from a text file, one pattern per linez--ignorefilezHsimilar to --matchfile but it receives patterns from text file to ignorez-Gz
--failfastz1fail as soon as a test fails (only with -v or -W)z-uz--usez
RES1,RES2,...rLz6specify which special resource intensive tests to run.)rhrerlrdz-Mz
--memlimit�LIMITz&run very large memory-consuming tests.z	--testdir�DIRzWexecute test files in the specified directory (instead of the Python stdlib test suite))rhrlrdzSpecial runsz-Lz
--runleaksz*run the leaks(1) command just before exit.z-Rz--huntrleaks�	RUNCOUNTSz:search for reference leaks (needs debug build, very slow).z-jz--multiprocess�	PROCESSESr#zrun PROCESSES processes at oncez-Tz
--coveragerz4turn on code coverage tracing using the trace modulez-Dz
--coverdirz&directory where coverage files are putz-Nz--nocoverdir�store_constrz$put coverage files alongside modules)rerMrKrdz-tz--threshold�	THRESHOLDz call gc.set_threshold(THRESHOLD)z-nz--nowindowsz'suppress error message boxes on Windowsz-Fz	--foreverzKrun the specified tests in a loop, until an error happens; imply --failfastz--list-testszAonly write the name of tests that will be run, don't execute themz--list-caseszGonly write the name of test cases that will be run , don't execute themz-Pz--pgor(z1enable Profile Guided Optimization (PGO) training)rKrerdz--pgo-extendedz.enable extended PGO training (slower training)z--tsanr*z<run a subset of test cases that are proper for the TSAN testz--fail-env-changedz>if a test file alters the environment, mark the test as failedz--fail-rerunzFif a test failed and then passed when re-run, mark the tests as failedz--junit-xmlr3z4writes JUnit-style XML results to the specified file)rKrhrdz	--tempdir�PATHz/override the working directory for the test runz	--cleanupz$remove old test_python_* directoriesz--bisectz/if some tests fail, run test.bisect_cmd on themz--dont-add-python-optsr2�store_falsezinternal option, don't use it)rB�USAGE�DESCRIPTION�EPILOG�argparse�RawDescriptionHelpFormatter�set_defaults�add_argument_group�add_argument�intrGrV�resources_list�relative_filenamer)rN�more_details�groups   r9�_create_parserr��s����]�#�$/�%�!&�(0�(L�(L�N�F����B��'�C�L��%�%�&7�8�E�	���t�X�f�=��?�	���{�<�-��.�
���{�<�/��0�
���{�I�=��>�
���x��-��.�
���t�Y��E�(�)��*�
���t�Z��K��M�	���|�V�)��7��9�
�%�%�k�2�E�	���t�[��M��O�	���t�Y�|�A��C�	���|�L�w�9��;�	���t�\�,�<��>�	���t�Y�|�E��G�	���t�[��L�8��:�	���z�,�@��B�
�%�%�&7�8�E�	���t�]�<�=��L��N�	���t�\�6�E�(�)��*�
���t�[��>��@�	���t�Z��A�(�)��*�
���t�Y��)�,�d�P��R�
���t�Z��)�,�e�Q��S�
���}�j�)�2�$�>��?�

���~�z�)�2�%�7��8�

���t�\�,�O��Q�	���t�W�o�&�^�&�(4�5��6�
���t�\�7�D�(�)��*�
���{�E�-�H��I�

�%�%�n�5�E�	���t�\�,�H�(�)��*�
���t�^�[�&�*�,8�9��:�
���t�-�{�$�3�=��?�
���t�\�,�#�%��&�
���t�\�5�-�D��F�
���t�^�+�4�j�B��D�
���t�]�K��>��@�
���t�]�<�E��G�	���t�[��>��?�
���~�l�1��2�
���~�l�5��6�
���t�W�5��O��Q�	���'��L��N�	���x�f�\�Z��\�	���+�L�1��2�
���~�l�7��8�
���}�9�j�#��$�
���{�F�M��O�	���{�<�B��D�	���z�,�M��O�	���/�6H�+�;��=��Mr:c�^�tjjtj|�SrI)�os�path�joinr�SAVEDCWD)�strings r9r�r�js���7�7�<�<�	�*�*�F�3�3r:c��|jd�}t|�dvrtjd��|drt	|d�nd}|drt	|d�nd}t|�dkDr
|dr|dnd	}|||fS)
N�:)��z&needs 2 or 3 colon-separated argumentsr�r�r�z
reflog.txt)�split�lenr}�ArgumentTypeErrorr�)r��args�nwarmup�ntracked�fnames     r9rrps����<�<���D�
�4�y����(�(�4�6�	6�"�1�g�c�$�q�'�l�1�G�#�A�w�s�4��7�|�A�H��4�y�1�}��a��D��G�l�E��H�e�#�#r:c���|jd�D�cgc]}|j���}}|D]:}|dk(s|dk(r�|ddk(r|dd}|tvs�$tjd|z��|Scc}w)N�,�all�noner�-rzinvalid resource: )r��lowerrr}r�)r��x�u�rs    r9r�r�{s���"�L�L��-�.�q�����.�A�.�
�G����:��f����Q�4�3�;��!�"��A��N�"��,�,�-A�A�-E�F�F�
G�
�H��	/s�A.c��t�}|j�D],\}}t||�std|z��t	|||��.|j
�g|_t
�}|j||��d|_|jD](}|jd�s�|jd|z��*|j�2|jdk7r	t|j�|_nd|_|js|jrJ|j �d|_d	|_d	|_d	|_|j(�d	|_d	|_d	|_nd
|_|jrD|j2�g|_|j2j5ddg�|j�Xd|_nP|jrD|j2�g|_|j2j5ddd
g�|j�d|_|j6r|j8r|jd�|j �|j:r|jd�|j(�A|j �|jd�t=j>|j(�|_|j@r)|jBs|j.s|jd�|jDr5|jBs|j*s|j.r|jd�|jFrd	|_"|jHrtKdtLjN��|jPrd|_!|j�|jdkrd|_|j2r�|j2D]�}|D]�}|dk(rtR|j
dd�|dk(r|j
dd�=�1d
}	|ddk(rd	}	|dd}|	r+||j
vs�S|j
jU|��o||j
vs�~|j
jW|�����|jX�d	|_|jBrd	|_-|j\r:|j.r.|j �"d
|_tKdtLjN��|j\r.|j^r"d|_/tKdtLjN��|j`rd	|_ |j\rM|j\\}
}}|
dks|dkr3d}
tK|
tLjNd	��tMjbd�|S#t$r"|jd|j���Y���wxYw)Nz3%r is an invalid keyword argument for this function)r�rOrr�zunrecognized arguments: %s�zinvalid timeout value: rTFr�i�z-cpuiXz-s and -f don't go together!z-T and -j don't go together!z-p requires -j!z#-G/--failfast needs either -v or -Wz--pgo/-v don't go together!z\Warning: the --nowindows (-n) option is deprecated. Use -vv to display assertions in stderr.)�filer�zZWARNING: Disable --verbose3 because it's incompatible with --huntrleaks without -jN optionzHWARNING: Disable --junit-xml because it's incompatible with --huntrleakszwInvalid values for the --huntrleaks/-R parameters. The number of warmups and repetitions must be at least 1 each (1:1).)r��flushr�)2r	rR�hasattr�	TypeError�setattrrr��parse_known_argsr��
startswithrDr-�float�
ValueError�slow_ci�fast_cir#rrr0�pythonrr!r r2�use�insertrrr�shlexr�r&rr(r)�	nowindows�print�sys�stderrrr�removerLr"r%rr3r$�exit)r�r7�ns�k�vrN�arg�ar�r��warmup�repetitions�_�msgs              r9�_parse_argsr��s���	��B��������1��r�1�~��0�23�4�5�
5���A�q��	�

�������
�
�F��%�%�4�2�%�>�q�A�B�G��w�w�=���>�>�#���L�L�5��;�<�=�
�z�z���:�:���
G�"�2�:�:�.��
��B�J�
�z�z�R�Z�Z�
�9�9���B�I����"�����
�
�9�9���B�H���
����#���
�z�z�
�6�6�>��B�F�
���
�
�a�%��!�
�:�:���B�J�	���
�6�6�>��B�F�
���
�
�a�%���)�
�:�:���B�J�	�y�y�R�[�[����3�4�	�y�y��������3�4�	�y�y��
�9�9���L�L�*�+��K�K��	�	�*��	�	�{�{�B�J�J�"�+�+����:�;�	�v�v�2�:�:����R�[�[����2�3�	������	�|�|�
�9�?B�z�z�	K�
�x�x���
�	�z�z��
�:�:��?��B�J�	�v�v����	/�A��
/����:�*7�B�$�$�Q�'����;��(�(��+�����Q�4�3�;�!�F��!�"��A���B�,�,�,��(�(�/�/��2��b�.�.�.��$�$�+�+�A�.�
/�	/�"
�~�~�!����	�z�z���	�

�}�}�������):����
�0��:�:�	�
�}�}������
�
�"��:�:�	�
�z�z����	�}�}�!#������Q��A�:��q��!�C�
�#�C�J�J�d�3��H�H�Q�K�
�I��u�
G����6�r�z�z�n�E�F�
G�s�U�'U=�<U=)r}�os.pathr�r�r��test.supportr�utilsrrrrzr{r|r	�ArgumentParserrB�ActionrGrVr�r�rr�r�rr:r9�<module>r�s������
�"�<�<�	��
��j
��Z*#��"�"�*#�ZJ��(�(�J�*�8�?�?�*�9�8�?�?�9�^�B4�$�	
�Sr:

Zerion Mini Shell 1.0