0x1949 Team - FAZEMRX - MANAGER
Edit File: cmdline.cpython-310.pyc
o ��+gL � @ s� d dl Z d dlZd dlZd dlmZ d dlmZ dZdZdZ dZ e d ZG d d � d e j�ZG dd� de j �Zd d� Zdd� Zdd� Zdd� Zdd� ZdS )� N)�support)� os_helperz�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; this is useful for reproducing troublesome test orders. -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. 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 ) �audio�curses� largefile�network�decimal�cpu� subprocess�urlfetch�gui)�extralargefile�tzdatac s e Zd Zd� fdd�Z� ZS )� Namespace�returnNc s� 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| _t� jdi |�� d S )Nr F� �coverage� )�testdir�verbose�quiet�exclude�single� randomize�fromfile� findleaks�fail_env_changed� use_resources�trace�coverdir�runleaks� huntrleaks�verbose2�verbose3� print_slow�random_seed�use_mp�forever�header�failfast�match_tests�ignore_tests�pgo�pgo_extended�super�__init__)�self�kwargs�� __class__r �//usr/lib/python3.10/test/libregrtest/cmdline.pyr/ � s6 zNamespace.__init__)r N)�__name__� __module__�__qualname__r/ � __classcell__r r r2 r4 r � s r c s e Zd Z� fdd�Z� ZS )� _ArgParserc s t � �|d � d S )Nz% Pass -h or --help for complete help.)r. �error)r0 �messager2 r r4 r: � s z_ArgParser.error)r5 r6 r7 r: r8 r r r2 r4 r9 � s r9 c C sl t dtttdtjd�} d}| �d�}|jdddd d � |jddtd d� |jdddd � |jddd� |jdddd| d� | �d�}|jddddd � |jdd dd!d � |jd"d#dd$d � |jd%d&dd'd � |jd(d)dd*d+d,� |jd-dd.d � | �d/�}|jd0d1dd2| d � |jd3d4d5t d6d7� |jd8d9d:d;| d� |jd<d=dd>d � |jd?d@ddA| d � |jdBdCdDdEdFdGdH� |jdIdJdDdKdFdLdH� |jdMdNdOdPdQ� |jdRdNdSdTdQ� |jdUdVddWd � |jdXdYdZdFt d[| d\� |jd]d^d_d`| d� |jdadbtdcd� | �dd�}|jdedfdgdhdidjdk� |jdldmddn| d � |jdodpdqtdr| d� |jdsdtdudvt dwd7� |jdxdyddzd{d,� |jd|d}dbtd~d� |jdd�dgd d�d�d�� |jd�d�d�t d�d� |jd�d�dd�d � |jd�d�dd�d � |jd�dd�d � |jd�dd�d � |jd�d�d�dd�d�� |jd�dd�d � |jd�dd�d � |jd�d�dNd�d�� |jd�d�d�d� |jd�dd�d � | S )�Nzregrtest.pyF)�prog�usage�description�epilog�add_help�formatter_classz- See the section at bottom for more details.zGeneral optionsz-hz--help�helpzshow this help message and exit)�actionrB z --timeout�TIMEOUTzxdump the traceback and exit if a test takes more than TIMEOUT seconds; disabled if TIMEOUT is negative or equals to zero)�metavar�typerB z--wait� store_truez:wait for user input, e.g., allow a debugger to be attachedz --worker-args�ARGS)rE z-Sz--start�STARTz'the name of the test at which to start.)rE rB � Verbosityz-vz --verbose�countz/run tests in verbose mode with output to stdoutz-wz --verbose2z#re-run failed tests in verbose modez-Wz --verbose3zdisplay test output on failurez-qz--quietz'no output unless one or more tests failz-oz --slowestr$ zprint the slowest 10 tests)rC �destrB z--headerz"print header with interpreter infozSelecting testsz-rz--randomizezrandomize test execution order.z --randseed�SEEDr% z5pass a random seed to reproduce a previous random run)rE rL rF rB 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* �appendz2match test cases and methods with glob pattern PAT)rE rL rC rB z-iz--ignorer+ z3ignore test cases and methods with glob pattern PATz--matchfile�FILENAME�match_filenamezJsimilar to --match but get patterns from a text file, one pattern per line)rE rL rB z--ignorefile�ignore_filenamezHsimilar 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,...z6specify which special resource intensive tests to run.)rE rC rF rB z-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)zSpecial runsz-lz--findleaks�store_const� r z&deprecated alias to --fail-env-changed)rC �const�defaultrB z-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&