Server IP : 85.214.239.14 / Your IP : 216.73.216.141 Web Server : Apache/2.4.65 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 8.2.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/cwd/proc/3/root/proc/3/root/usr/lib/python2.7/test/ |
Upload File : |
� �,bc@sKdZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlZddlZddl Z ddlZddlZddlZx~ejj�D]mZeed�rgejD]Zejje�^q�e_need�rCejjej�e_nq�Wejdkr�yddlZWnek rynNXejej�\ZZeee edd��Z!ej"eje!ef�nejdkryddl#Z#Wne$k r�nXnd Z%d Z&dZ'dZ(dZ)d Z*ddl+m,Z,dddddddddddfZ-ejje j.��Z/dd�Z0e1e1d e2e2e2e2e1e2e1e2de2e2e2e2e1e1e2e2e2e2d�Z3ddd d!d"d#d$d%d&g Z4d'd(d)hZ5e1e4e5d*�Z6e2e1e2d+�Z7d,fd-��YZ8e2e2d.�Z9d/�Z:d0�Z;d1�Z<d2�Z=e1d3�Z>d4�Z?d5�Z@d6d7d8�ZAid9d6d:d;6d<d=6d<d>6d?d@6dAdB6dCd6dDdE6dFdG6dHdI6dJdK6dLdM6dNdO6dPdQ6dRdS6dTdU6ZBeBdOeBdV<eBdOeBdW<eBdOeBdX<eBdOeBdY<dZfd[��YZCeDd\krGejje�ZeejjejEd �ks�tF�ejG�r�ejjHejId]�d^�Z/ejje/�Z/ejjJe/�r�ejKe/�nnd_jLejM��ZNejjHe/eN�ZNe,jOeNd`eP��e3�WdQXndS(asA Usage: python -m test.regrtest [options] [test_name1 [test_name2 ...]] python path/to/Lib/test/regrtest.py [options] [test_name1 [test_name2 ...]] 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 -tt -Wd -3 -m test.regrtest [options] [test_name1 ...] Options: -h/--help -- print this text and exit Verbosity -v/--verbose -- run tests in verbose mode with output to stdout -w/--verbose2 -- re-run failed tests in verbose mode -W/--verbose3 -- re-run failed tests in verbose mode immediately -q/--quiet -- no output unless one or more tests fail -S/--slow -- print the slowest 10 tests --header -- print header with interpreter info Selecting tests -r/--randomize -- randomize test execution order (see below) --randseed -- pass a random seed to reproduce a previous random run -f/--fromfile -- read names of tests to run from a file (see below) -x/--exclude -- arguments are tests to *exclude* -s/--single -- single step through a set of tests (see below) -u/--use RES1,RES2,... -- specify which special resource intensive tests to run -M/--memlimit LIMIT -- run very large memory-consuming tests Special runs -l/--findleaks -- if GC is available detect tests that leak memory -L/--runleaks -- run the leaks(1) command just before exit -R/--huntrleaks RUNCOUNTS -- search for reference leaks (needs debug build, v. slow) -j/--multiprocess PROCESSES -- run PROCESSES processes at once -T/--coverage -- turn on code coverage tracing using the trace module -D/--coverdir DIRECTORY -- Directory where coverage files are put -N/--nocoverdir -- Put coverage files alongside modules -t/--threshold THRESHOLD -- call gc.set_threshold(THRESHOLD) -F/--forever -- run the specified tests in a loop, until an error happens -P/--pgo -- enable Profile Guided Optimization training 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. -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 howmuch 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. 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 >2GB of disk space temporarily. network - It is okay to run tests that use external network resource, e.g. testing SSL support for sockets. bsddb - It is okay to run the bsddb testsuite, which takes a long time to complete. 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. xpickle - Test pickle and cPickle against Python 2.4, 2.5 and 2.6 to test backwards compatibility. These tests take a long time to run. To enable all resources except one, use '-uall,-<resource>'. For example, to run all the tests except for the bsddb tests, give the option '-uall,-bsddb'. i����Nt__path__t__file__tdarwiniitwin32iii����i����i����(ttest_supporttaudiotcursest largefiletnetworktbsddbtdecimaltcput subprocessturlfetchtguitxpickletcCs$tGH|r|GHntj|�dS(N(t__doc__tsystexit(tcodetmsg((s#/usr/lib/python2.7/test/regrtest.pytusage�stcoveragecJs�tjtj�yqtjtjddddddddd d ddd ddddddddddddddg�\}}Wn#tjk r�}td|�nX|d;kr�t j d�}n�d;kr�g�nx�|D]~\}}|d�krtd �q�|d�kr�d7�q�|d�kr4t}q�|d�krIt}q�|d�krdt�d �q�|d�kryt}q�|d�kr�t}q�|d�kr�t}q�|d�kr�t}q�|d1kr�t|�}q�|d�kr�|}q�|d�kr�t}q�|d�krt}q�|d�kr@d:d;l }|jt|��q�|d�krUt} q�|d�krtjjtj�|�}q�|d�kr�d;}q�|d�kr`|jdD��t��d�kr�|G�GHtddF�n�d s�dG�d <nt�d ��d <�dsdH�d<nt�d��d<t��dksM�dr_dIg�d)q_q�|d�kr|tj|�q�|d�krgg|jdN�D]}|j�^q�}x�|D]�}|dOkr�t�(q�nt}|d dPkr�t}|d}n|tkrtddQ|�n|rD|�kr`�j|�q`q�|�kr��j|�q�q�Wq�|d�kr|t}q�|d�kr�t|�}q�|dVkr�t}q�|dWkr'tj|�\}} yt|| �}!Wn%tk r}"t|"j j!f}!nXHtj"|!�GHtj#d �q�|d�kr<t� q�tj$dZj%|�IJtj#d�q�W|r|rtdd[�n|r�| r�tdd\�n|r�|r�tdd]�ng�g�g� g�g�t}#|ryd:d;l }Wnt&k rd^GHt}qXg}$n|r�tjjt'd_�}%y8t(|%d`�}&|&j)�j*�}'|'g�|&j+�Wq�t,k rq�Xn|rg�t(tjjtj-|��}&xD|&D]<}(|(j�})|)r�|)d j.da�r��j/|)�q�q�W|&j+�nt0|�t0��t1}*t2j3�}+|rqx7|D]/},|,|*krW|*j|,�n|+j4|,�q5Wg}n�s�|s��p�|p��p�|r� sdbGt5j6�Gdcjtj7j��GHddGt5j5det�Gdftj8GHddGtj�GHdgGtj9GHqnt:||*|+�}-�p#|p#|-}.|rr|.d }.y|-|-j;|.d �d}/Wqrt<k rnd;}/qrXn|r�t j=|�dhG|GHt j>|.�n| r�d:d;l?} | j@ditjAtjBgdtdjt�}0ng��t_CtDtjE�}1����� �fdk�}2|rO tF|.��fdl�}3|3��dm}4dE}5n1tG|.��dnj%t|.��}4t|4�d}5|r!yd:dolHmI}6Wn#t&k r� dpGHtj#d�nXd:dqlJmJ}7d:drlKmL�mM�tNjOds��|7���� ����fdt�}8|8�� tjP�}9tjQg|9dudvg�� ra �dYg�n������ fdw�}:gtR|�D]};|6dx|:�^q� }<x|<D]}=|=jS�q� Wd }>d}?yx |>|kr��jT�\}@}A}B}!|@d;kr|>d7}>q� n|Ar"|AGHn|Br?� r?tj$|BIJntjjU�tj$jU�|!d tkr�|!ddykstV�tW�n|2|@|!��s��r�dznd{}C|Cj%|5|?|4t��|@�GHn|?d7}?q� WWn!tWk rt}#� j+�nXx�|<D]}=|=j�q Wn�x�tX�d�D]�\}?}@�s��rOdznd{}C|Cj%|5|?|4t��|@�GHtjjU�n| r�|0jYd|d}tZ�d~t[��n�ypt|@���d;� �}!|2|@|!�|r |!d t\kr � s d|@GHnt|@t��d;� �nWn!tWk r7 t}#Pn �nX|r� |j]�|j^r� d�Gt|j^�Gd�GH|$j/|j^�|j^2q� nxBtjEj_�D]1}D|D|1kr� |Dj.d��r� tj`|D�q� q� Wq1W|#r8� r8Hd�GHtD|.�tD��tD��tD� �}Etat|E�d��Gd�GHtb|E�n�r��r�� r��rz� rz|#rzt��dkrzd�Gntat��d��Gd�GHn|r��jcd�t�d�GHx*�d� D]\}F}@d�|@|FfGHq�Wn�r� rtat��d��Gd�GHtb��n�rF� rFd�j%tat��d���GHtb��n� r�r� rtat� �d��Gd�GHtb� �td�}"tj5}G|"je�r�tD� �|"jf�tD��}H|Hr�tat|H�d��Gd�G|GdDGHtb|H�qd�G|Gd�GHqd�GHd�G|Gd�GHn|r��r�d�GHx��D]�}@d|@GHtjjU�y(tt_gt|@t��d;� �}IWntWk r�HPq+X|Id thtitjtkhkr+�j|@�q+q+W�r�tat��d��Gd�GHtb��q�n|r+|/rt(|%d���}&|&jl|/d��Wd;QXq+tjm|%�n| r\|0jn�}|jod�td�td�|�n|r|tjpd�tjq��ntj#t��d kp�|#�d;S(�slExecute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdir -- the directory in which to look for tests (optional) Users other than the Python test suite will certainly want to specify testdir; if it's omitted, the directory containing the Python test suite is searched for. If the tests argument is omitted, the tests listed on the command-line will be used. If that's empty, too, then all *.py files beginning with test_ will be used. The other default arguments (verbose, quiet, exclude, single, randomize, findleaks, use_resources, trace, coverdir, print_slow, and random_seed) allow programmers calling main() directly to set the values that would normally be set by flags on the command line. ishvqxsSrf:lu:t:TD:NLR:FwWM:j:Pthelptverbosetverbose2tverbose3tquiettexcludetsingletslowt randomizes fromfile=t findleakssuse=s threshold=ttraces coverdir=t nocoverdirtrunleaksshuntrleaks=s memlimit=s randseed=s multiprocess=s slaveargs=tforevertheadertpgoii���s-hs--helpis-vs --verboses-ws --verbose2s-Ws --verbose3s-qs--quiets-xs --excludes-ss--singles-Ss--slows-rs--randomizes --randseeds-fs --fromfiles-ls--findleakss-Ls --runleakss-ts--thresholdi����Ns-Ts --coverages-Ds --coverdirs-Ns--nocoverdirs-Rs--huntrleakst:is)-R takes 2 or 3 colon-separated argumentsiis reflog.txts-Ms --memlimits-us--uset,tallt-sInvalid -u/--use option: s-Fs --forevers-js--multiprocesss--headers--slaveargss-Ps--pgosQNo handler for option {}. Please report this as a bug at http://bugs.python.org.s-s and -f don't go together!s-T and -j don't go together!s-l and -j don't go together!s%No GC available, disabling findleaks.t pynexttesttrt#s==t s== taliaseds %s-endiansTesting with flags:sUsing random seedt ignoredirstcountcs�|\}}�j||f�|tkr;�j|�n}|tkrW�j|�na|tkrs�j|�nE|tkr��j|�n)|tkr��j|��j|�ndS(N(tappendtPASSEDtFAILEDtENV_CHANGEDtSKIPPEDtRESOURCE_DENIED(ttesttresulttokt test_time(tbadtenvironment_changedtgoodtresource_deniedstskippedt test_times(s#/usr/lib/python2.7/test/regrtest.pytaccumulate_result�s c3s1x*tr,x|D]}|V�rdSqWqWdS(N(tTrue(ttestsR9(R=(s#/usr/lib/python2.7/test/regrtest.pyttest_forever�s Rs/{}(tThreads+Multiprocess option requires thread support(tQueue(tPopentPIPEs \[\d+ refs\]$c 3sJxC�D];}|��ftd�d�d��f}||fVqWdS(Nt huntrleakst use_resourcesR'(tdict(R9t args_tuple(RKR'RRERLR(s#/usr/lib/python2.7/test/regrtest.pyttests_and_args�s s-ms test.regrtestcs>yxtryt��\}}Wntk rC�jd �dSX��dtj|�gd�d�dtdtjdk�}|j �\}}�j d|�}|j�jd�\}}}|s��jd �dStj |�}�j||j�|j�|f�qWWn!tk r9�jd��nXdS(Ns--slaveargststdouttstderrtuniversal_newlinest close_fdstntRs (NNNN(NNNN(NNNN(RDtnextt StopIterationtputtNonetjsontdumpstostnametcommunicatetsubtstript rpartitiontloadstrstript BaseException(R9RNtpopenRPRQt_R:(RJRItbase_cmdtdebug_output_pattoutputtpending(s#/usr/lib/python2.7/test/regrtest.pytwork s, - ttargettKeyboardInterrupts[{1:{0}}{2}/{3}] {4}s[{1:{0}}{2}] {4}sruntest(test, verbose, quiet)tglobalstlocalss"Re-running test %r in verbose modesWarning: test createdsuncollectable object(s).stest.s(Test suite interrupted by signal SIGINT.R9somitted:tAllsOK.treverses10 slowest tests:i s %s: %.1fssfailed:s%{} altered the execution environment:sskipped:tskips unexpected onsThose skips are all expected ont.s6Ask someone to teach regrtest.py about which tests aresexpected to get skipped ons'Re-running failed tests in verbose modes failed again:tws tshow_missingtsummarytcoverdirsleaks %d(s-hs--help(s-vs --verbose(s-ws --verbose2(s-Ws --verbose3(s-qs--quiet(s-xs --exclude(s-ss--single(s-Ss--slow(s-rs--randomize(s-fs --fromfile(s-ls--findleaks(s-Ls --runleaks(s-ts--threshold(s-Ts --coverage(s-Ds --coverdir(s-Ns--nocoverdir(s-Rs--huntrleaks(ii(s-Ms --memlimit(s-us--use(s-Fs --forever(s-js--multiprocess(s-Ps--pgo(rRtrecord_original_stdoutRRPtgetopttargvterrorRRXtrandomt randrangeRDtinttgct set_thresholdR[tpathtjointgetcwdtsplittlentset_memlimittlowertRESOURCE_NAMEStFalsetremoveR3RYRatruntestRctINTERRUPTEDt __class__t__name__RZRRQtformattImportErrortTEMPDIRtopentreadR_tclosetIOErrortSAVEDCWDt startswithtextendtremovepytSTDTESTStNOTTESTStcopytaddtplatformtpython_implementationtversiont byteordertflagst findteststindext IndexErrortseedtshuffleR"tTracetprefixtexec_prefixRLtsettmodulestlisttitert threadingRGRHRRIRJtretcompiletargs_from_interpreter_flagst executabletrangetstarttgettflushtAssertionErrorRlt enumeratetrunctxRmtvarsR5tcollecttgarbagetkeystunloadR2t printlisttsortt_ExpectedSkipstisvalidtgetexpectedRR4R6R7R8twritetunlinktresultst write_resultstsystemtgetpid(JREttestdirRRRRR tfromfileR!RLR"RvR$RKRt print_slowtrandom_seedtuse_mpRR%R&R'toptstargsRtotaR~txtuR-R�tkwargsR:tetinterruptedt found_garbagetfilenametfpt next_testtlinetgutststdteststnotteststargtallteststselectedtnext_single_testttracertsave_modulesRCRFt test_countttest_count_widthRGRHROtopt_argsRjtitworkerstworkertfinishedt test_indexR9RPRQtfmttmoduletomittedttimetplattsurpriseR;((RJRIR=RfRgR>R?RKRhRiR'RR@RARBRERLRs#/usr/lib/python2.7/test/regrtest.pytmain�s�" ( % ( * ' ttest_grammarttest_opcodest test_dictttest_builtinttest_exceptionst test_typest test_unittestttest_doctestt test_doctest2Rttest_future1ttest_future2c Cs�t|�}tj|�}g}t|�|B}x^|D]V}tjj|�\}}|d dkr8|dkr8||kr8|j|�q8q8W|t|�S(s-Return a list of all applicable test modules.ittest_s.py(tfindtestdirR[tlistdirR�R�tsplitextR3tsorted( R�R�R�tnamesREtothersR\tmodnametext((s#/usr/lib/python2.7/test/regrtest.pyR��s (cCsP|t_|dk r!|t_nzt|||||�SWdt||�XdS(soRun a single test. test -- the name of the test verbose -- if true, print more messages quiet -- if true, don't print 'skipped' messages (probably redundant) test_times -- a list of (time, test_name) pairs huntrleaks -- run multiple times to test for leaks; requires a debug build; a triple corresponding to -R's three arguments pgo -- if true, do not print unnecessary info when running the test for Profile Guided Optimization build Returns one of the test result constants: INTERRUPTED KeyboardInterrupt when run under -j RESOURCE_DENIED test skipped because resource denied SKIPPED test skipped for some other reason ENV_CHANGED test failed because it changed the execution environment FAILED test failed PASSED test passed N(RRRXRLt runtest_innertcleanup_test_droppings(R9RRRKRLR'((s#/usr/lib/python2.7/test/regrtest.pyR��s tsaved_test_environmentc Bs�eZdZeZdeed�Zd#Zd�Zd �Zd�Z d�Z d�Zd�Zd�Z d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd �Zd!�Zd"�ZRS($s�Save bits of the test environment and restore them at block exit. with saved_test_environment(testname, verbose, quiet): #stuff Unless quiet is True, a warning is printed to stderr if any of the saved items was changed by the test. The attribute 'changed' is initially False, but is set to True if a change is detected. If verbose is more than 1, the before and after state of changed items is also printed. icCs(||_||_||_||_dS(N(ttestnameRRR'(tselfRRRR'((s#/usr/lib/python2.7/test/regrtest.pyt__init__s ssys.argvtcwds sys.stdins sys.stdouts sys.stderrs os.environssys.pathsasyncore.socket_maptfilescCsttj�tjtjfS(N(tidRRy(R ((s#/usr/lib/python2.7/test/regrtest.pytget_sys_argv#scCs|dt_|dtj(dS(Nii(RRy(R t saved_argv((s#/usr/lib/python2.7/test/regrtest.pytrestore_sys_argv%s cCs tj�S(N(R[R�(R ((s#/usr/lib/python2.7/test/regrtest.pytget_cwd)scCstj|�dS(N(R[tchdir(R t saved_cwd((s#/usr/lib/python2.7/test/regrtest.pytrestore_cwd+scCstjS(N(RRP(R ((s#/usr/lib/python2.7/test/regrtest.pytget_sys_stdout.scCs |t_dS(N(RRP(R tsaved_stdout((s#/usr/lib/python2.7/test/regrtest.pytrestore_sys_stdout0scCstjS(N(RRQ(R ((s#/usr/lib/python2.7/test/regrtest.pytget_sys_stderr3scCs |t_dS(N(RRQ(R tsaved_stderr((s#/usr/lib/python2.7/test/regrtest.pytrestore_sys_stderr5scCstjS(N(Rtstdin(R ((s#/usr/lib/python2.7/test/regrtest.pyt get_sys_stdin8scCs |t_dS(N(RR(R tsaved_stdin((s#/usr/lib/python2.7/test/regrtest.pytrestore_sys_stdin:scCs"ttj�tjttj�fS(N(RR[tenvironRM(R ((s#/usr/lib/python2.7/test/regrtest.pytget_os_environ=scCs2|dt_tjj�tjj|d�dS(Nii(R[R#tcleartupdate(R t saved_environ((s#/usr/lib/python2.7/test/regrtest.pytrestore_os_environ?s cCsttj�tjtjfS(N(RRR�(R ((s#/usr/lib/python2.7/test/regrtest.pytget_sys_pathDscCs|dt_|dtj(dS(Nii(RR�(R t saved_path((s#/usr/lib/python2.7/test/regrtest.pytrestore_sys_pathFs cCs+tjjd�}|r'|jj�p*iS(Ntasyncore(RR�R�t socket_mapR�(R R,((s#/usr/lib/python2.7/test/regrtest.pytget_asyncore_socket_mapJscCsEtjjd�}|dk rA|jdt�|jj|�ndS(NR,t ignore_all(RR�R�RXt close_allRDR-R&(R t saved_mapR,((s#/usr/lib/python2.7/test/regrtest.pytrestore_asyncore_socket_mapNscCsFtjjtj�rd}n$tjjtj�r<d}nd}|S(Ntftd(R[R�tisfileRtTESTFNtisdirRX(R R:((s#/usr/lib/python2.7/test/regrtest.pytget_test_support_TESTFNTs cCsc|dkr_tjjtj�r4tjtj�q_tjjtj�r_tj tj�q_ndS(N( RXR[R�R5RR6R�R7tshutiltrmtree(R tsaved_value((s#/usr/lib/python2.7/test/regrtest.pytrestore_test_support_TESTFN\s cCs td�tjtj�D��S(Ncss1|]'}|tjj|�r$dndVqdS(t/RN(R[R�R7(t.0tfn((s#/usr/lib/python2.7/test/regrtest.pys <genexpr>ds(RR[Rtcurdir(R ((s#/usr/lib/python2.7/test/regrtest.pyt get_filescs cCsptj}||krl|d|krltjj|�rGtj|�qltjj|�rltj|�qlndS(NR=(RR6R[R�R5R�R7R:(R R;R?((s#/usr/lib/python2.7/test/regrtest.pyt restore_filesfs ccs^xW|jD]L}|jdd�}d|}d|}|t||�t||�fVq WdS(NRrRetget_trestore_(t resourcestreplacetgetattr(R R\t method_suffixtget_nametrestore_name((s#/usr/lib/python2.7/test/regrtest.pyt resource_infons cCs#td�|j�D��|_|S(Ncss'|]\}}}||�fVqdS(N((R>R\R�trestore((s#/usr/lib/python2.7/test/regrtest.pys <genexpr>vs(RMRKtsaved_values(R ((s#/usr/lib/python2.7/test/regrtest.pyt __enter__us c Cs�|j}|`x�|j�D]�\}}}|�}|j|�} || krt|_|| �|jr�|jr�tjdj ||j �IJ|jdkr�|jr�tjdj | |�IJq�q�qqWtS(Ns Warning -- {} was modified by {}is Before: {} After: {} ( RMRKtpopRDtchangedRR'RRQR�RRR�( R texc_typetexc_valtexc_tbRMR\R�RLtcurrenttoriginal((s#/usr/lib/python2.7/test/regrtest.pyt__exit__zs" ( ssys.argvRs sys.stdins sys.stdouts sys.stderrs os.environssys.pathsasyncore.socket_mapR(R�t __module__RR�RPRRERRRRRRRRR R"R$R(R)R+R.R2R8R<RARBRKRNRV(((s#/usr/lib/python2.7/test/regrtest.pyR�s: c CsYtj|�|rd}ntj�}d}t}ytj}z�|rU|t_n|jd�rm|} n d|} t�t ||||���} t j �}t| t�t �g�}t||�} t| dd�}|dk r�|�n|rt| |||�}nt j �|}WdQXWd|t_XWn�tjk r�}|rw|rw|GdG|GHtjj�nt|fStjk r�}|r�|r�|GdG|GHtjj�nt|fStk r��nztjk r,}|stjdI|IdI|IJntjj�t|fStj�d \}}|s}tjdI|IdIt|�d I|IJntjj�|r�|r�tjd tj�tjj�nt|fSX|r�t|fS| jr�t|fS|s�|r�t |fS|j!�}|st |fSdG|GdGHdd GH|GHdd GHtjj�t|fSdS(Ngstest.t test_mains skipped --R9s failed --is crashed --R(tfilesproduced unexpected output:t*iF("RR�RXtStringIOR�RRPR�tclear_cachesRR�t __import__RmRnRGtdash_RtResourceDeniedR�R8tunittesttSkipTestR7Rlt TestFailedRQR5texc_infotstrt tracebackt print_excRPR6R4tgetvalue(R9RRRKR'tcapture_stdoutR<trefleaktsave_stdouttabstesttenvironmentt start_timetthe_packaget the_modulet indirect_testRttypetvalueRh((s#/usr/lib/python2.7/test/regrtest.pyR �s� " 2 cCsAddl}ddl}|j�xtjdfD]}tjj|�sPq2ntjj|�rudt j }}n5tjj|�r�dtj}}nt d|��|r�d|||fGHnyAttd�r�tj||j|jB|jB�n||�Wq2tk r8}tjd||||fIJq2Xq2WdS( Ni����tdb_homet directoryRYs8os.path says %r exists but is neither directory nor files%r left behind %s %rtchmods3%r left behind %s %r and it couldn't be removed: %s(tstatR~R�RR6R[R�texistsR7R9R:R5R�tSystemErrorthasattrRutS_IRWXUtS_IRWXGtS_IRWXOt ExceptionRRQ(RRRvR~R\tkindtnukerR((s#/usr/lib/python2.7/test/regrtest.pyR �s, $ cs�ddl}ddl}ddl}ttd�sBtd��ntj}|jj �}tj j �} yddl} Wntk r�d}nX| jj �}i}||f} x�g| D]%}|jD]}t||�^q�q�D]L}t|d�sq�nx.|j�|gD]}|jj �||<qWq�W�rP�fd�}n�fd�}g}|\}}}tjjtj|�}||}tjdI|Id IJtjd |dd| IJt||| ||�xyt|�D]k}tj�}|�tjjd �t||| ||�tj�}||kr�|j||�q�q�WtjJt|�r�d||t|�f}tj|IJt |d��}||IJ|j!�WdQXt"St#S(s�Run a test multiple times, looking for reference leaks. Returns: False if the test didn't leak references; True if we detected refleaks. i����Ntgettotalrefcounts9Tracking reference leaks requires a debug build of Pythont _abc_registrycs��dS(N(((Rp(s#/usr/lib/python2.7/test/regrtest.pytrun_the_test+scstj��dS(N(timptreload((Ro(s#/usr/lib/python2.7/test/regrtest.pyR�.st beginningtrepetitionst 1234567890i iRrs%s leaked %s references, sum=%sR�($tcopy_regt_abcollt_pyioRyRR}twarningstfilterstdispatch_tableR�tpath_importer_cachet zipimportR�RXt_zip_directory_cachet__all__RGt__subclasses__R�R[R�R�RR�RQtdash_R_cleanupR�R�R�R3tanytsumR�R�RDR�(RoR9RpRKR�R�R�tfstpstpicR�tzdctabcsR�tmodR�tabctobjR�tdeltastnwarmuptntrackedtfnametrepcountR�t rc_beforetrc_afterRtrefrep((RpRos#/usr/lib/python2.7/test/regrtest.pyR^ sZ$ 9 c Cs�ddl}ddl}|tj(|jj�|jj|�tjj�tjj|�yddl }Wnt k rnX|jj�|jj|�tj�xC|j �D]5\}} | j�|_|jj�|jj�q�Wt�dS(Ni����(R~R�R�R�R�R%R&RR�R�R�R�t_clear_type_cachetitemsR�R�t _abc_cachet_abc_negative_cacheR\( R�R�R�R�R�R~R�R�R�tregistry((s#/usr/lib/python2.7/test/regrtest.pyR�Js$ cCs�ddl}x/tjj�D]}t|d�r|`qqWytjd}Wntk rbnX|jj�t j �ytjd}Wntk r�nX|jj�ytjd}Wntk r�nX|j�ytjd}Wntk r�nX|j �ytjd}Wntk r.nX|jd�ytjd}Wntk r`nX|j�ytjd }Wntk r�nX|j�ytjd } Wntk r�nX| j�ytjd} Wntk r�nX| jj�ytjd}Wntk rnX|j�ytjd }Wntk rNn Xd|_ytjd} Wntk r|nX| j�|j�dS(Ni����t__warningregistry__sdistutils.dir_utilt _strptimeturlparseturllibturllib2tdircachet linecachet mimetypestfilecmptstructtdoctesttctypes(R~RR�tvaluesRyR�tKeyErrort _path_createdR%R�tpurget_regex_cachetclear_cachet urlcleanuptinstall_openerRXtresett clearcachet_default_mime_typest_cachet_clearcachetmastert_reset_cacheR�(R~R�tdistutils_dir_utilR�R�R�R�R�R�R�R�R�R�R�((s#/usr/lib/python2.7/test/regrtest.pyR\fs� cCs|ptjjt�ptjS(N(R[R�tdirnameRR@(R�((s#/usr/lib/python2.7/test/regrtest.pyR�scCs\|s dSxKt|�D]=\}}tjj|�\}}|dkr|||<qqWdS(Ns.py(R�R[R�R(RtidxR\tbasenameR((s#/usr/lib/python2.7/test/regrtest.pyR��scCs,|dkrd||fSd||fSdS(Nis%d %ss%d %ss((tntword((s#/usr/lib/python2.7/test/regrtest.pyR2�siFicCsQddlm}d|}|djd�t|�D��|d|d|�GHdS(s�Print the elements of iterable x to stdout. Optional arg width (default 70) is the maximum line length. Optional arg indent (default 4) is the number of blanks with which to begin each line. i����(tfillR/css|]}t|�VqdS(N(Rd(R>telt((s#/usr/lib/python2.7/test/regrtest.pys <genexpr>�stinitial_indenttsubsequent_indentN(ttextwrapR�R�R(R�twidthtindentR�tblanks((s#/usr/lib/python2.7/test/regrtest.pyR��s %sl test__locale test_bsddb185 test_bsddb3 test_commands test_crypt test_curses test_dbm test_dl test_fcntl test_fork1 test_epoll test_gdbm test_grp test_ioctl test_largefile test_kqueue test_mhlib test_openpty test_ossaudiodev test_pipes test_poll test_posix test_pty test_pwd test_resource test_signal test_spwd test_threadsignals test_timing test_wait3 test_wait4 s� test_bsddb185 test_curses test_dl test_largefile test_kqueue test_ossaudiodev tlinux2s� test_bsddb test_bsddb185 test_dl test_epoll test_largefile test_kqueue test_minidom test_openpty test_pyexpat test_sax test_sundry t unixware7t openunix8s� test_asynchat test_bsddb test_bsddb185 test_dl test_fork1 test_epoll test_gettext test_largefile test_locale test_kqueue test_minidom test_openpty test_pyexpat test_queue test_sax test_sundry test_thread test_threaded_import test_threadedtempfile test_threading tsco_sv3se test_asynchat test_atexit test_bsddb test_bsddb185 test_bsddb3 test_commands test_crypt test_dbm test_dl test_fcntl test_fork1 test_epoll test_gdbm test_grp test_largefile test_locale test_kqueue test_mmap test_openpty test_poll test_popen2 test_pty test_pwd test_strop test_sundry test_thread test_threaded_import test_threadedtempfile test_threading test_timing triscoss test__locale test_bsddb test_bsddb3 test_curses test_epoll test_gdb test_gdbm test_largefile test_locale test_kqueue test_minidom test_ossaudiodev test_poll s� test_bsddb test_bsddb185 test_curses test_dbm test_epoll test_kqueue test_gdbm test_gzip test_openpty test_zipfile test_zlib tsunos5sC test_bsddb test_bsddb185 test_curses test_dl test_epoll test_gdbm test_gzip test_largefile test_locale test_kqueue test_minidom test_openpty test_pyexpat test_sax test_zipfile test_zlib shp-ux11s test_bsddb185 test_curses test_dl test_gdbm test_epoll test_largefile test_locale test_kqueue test_mhlib test_mmap test_poll test_popen2 test_resource tatheoss� test_bsddb185 test_bsddb3 test_curses test_dbm test_epoll test_ioctl test_kqueue test_largefile test_locale test_ossaudiodev test_socketserver tcygwinsN test_audioop test_bsddb185 test_bsddb3 test_commands test_curses test_dl test_epoll test_kqueue test_largefile test_mhlib test_mmap test_openpty test_ossaudiodev test_pty test_resource test_signal tos2emxs^ test_bsddb test_bsddb3 test_epoll test_gdbm test_locale test_ossaudiodev test_pep277 test_pty test_socketserver test_tcl test_tk test_ttk_guionly test_ttk_textonly test_timeout test_urllibnet test_multiprocessing tfreebsd4sH test_bsddb test_bsddb185 test_bsddb3 test_bz2 test_dl test_epoll test_gdbm test_gzip test_kqueue test_ossaudiodev test_tcl test_tk test_ttk_guionly test_ttk_textonly test_zipimport test_zlib taix5sa test_ascii_formatd test_bsddb test_bsddb3 test_ctypes test_dl test_epoll test_gdbm test_locale test_normalization test_ossaudiodev test_pep277 test_tcl test_tk test_ttk_guionly test_ttk_textonly test_multiprocessing topenbsd3sp test_ascii_formatd test_bsddb test_bsddb185 test_bsddb3 test_ctypes test_curses test_dl test_epoll test_gdbm test_locale test_ossaudiodev test_pep277 test_tcl test_tk test_ttk_guionly test_ttk_textonly test_multiprocessing tnetbsd3tfreebsd5tfreebsd6tfreebsd7tfreebsd8R�cBs#eZd�Zd�Zd�ZRS(cCs0ddl}ddlm}t|_tjtkr,ttj}t|j ��|_ |j jd�|jj s�|j jd�n|jr�|j jd�ntjdkr�|j jd�ntjdkrd d ddd dg}xO|D]}|j j|�q�Wn.tdjd��dkr<|j jd �ntjdkr�ddddddg}x!|D]}|j j|�qjWntjdkr�ddddddg}x!|D]}|j j|�q�Wntjdkr|j jd �|j jd!�ntjs |j jd"�nt|_ndS(#Ni����(ttest_timeoutttest_linuxaudiodevttest_pep277R�l����ttest_imageopRt test_macosttest_macostoolsttest_aepackt test_plistlibttest_scriptpackagesttest_applesingleusunicode-internaliRttest_unicode_filettest_winregt test_winsoundttest_startfilettest_sqlitettest_msilibtirixttest_alttest_cdttest_clttest_glttest_imgfileR�ttest_sunaudiodevttest_nist test_py3kwarn(tos.pathR9R�R�tvalidRR�t _expectationsR�R�texpectedR�R�tsupports_unicode_filenamest skip_expectedtmaxintR�tencodetpy3kwarningRD(R R[R�tstMAC_ONLYRqtWIN_ONLYt IRIX_ONLY((s#/usr/lib/python2.7/test/regrtest.pyR,sL cCs|jS(s@Return true iff _ExpectedSkips knows about the current platform.(R�(R ((s#/usr/lib/python2.7/test/regrtest.pyR�cscCs|j�st�|jS(snReturn set of test names we expect to skip on current platform. self.isvalid() must be true. (R�R�R(R ((s#/usr/lib/python2.7/test/regrtest.pyR�gs(R�RWRR�R�(((s#/usr/lib/python2.7/test/regrtest.pyR�+s 7 t__main__tsrcdirtbuildstest_python_{}R(QRR[RxRYR[R{R�R9RR�ReR�R`ttempfileR�R�t sysconfigR�t itervaluesR�RyRR�tabspathRtresourceR�t getrlimittRLIMIT_STACKtsoftthardtmintmaxtnewsoftt setrlimittFixTkR}R4R5R6R7R8R�R9RR�t gettempdirR�RRXR�R�R�R�R�R�RR R R^R�R\RR�R2R�RR�R�RyR�tis_python_buildR�tget_config_varRwtmkdirR�R�tTESTCWDttemp_cwdRD(((s#/usr/lib/python2.7/test/regrtest.pyt<module>�s� . �� &�P ' @ c " ! E%