Current File : //opt/imh-python/lib/python2.7/test/regrtest.pyo
�
��Wc@sdZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
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(dZ)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<e1d2�Z=d3�Z>d4�Z?d5d6d7�Z@id8d6d9d:6d;d<6d;d=6d>d?6d@dA6dBd6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6dQdR6dSdT6ZAeAdNeAdU<eAdNeAdV<eAdNeAdW<eAdNeAdX<dYfdZ��YZBeCd[krejje�ZejD�r�ejjEejFd\�d]�Z/ejje/�Z/ejjGe/�r�ejHe/�nnd^jIejJ��ZKejjEe/eK�ZKe,jLeKd_eM��e3�WdQXndS(`sA
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����(ttest_supporttaudiotcursest	largefiletnetworktbsddbtdecimaltcput
subprocessturlfetchtguitxpickletcCs$tGH|r|GHntj|�dS(N(t__doc__tsystexit(tcodetmsg((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytusage�stcoveragecJs�tjtj�yqtjtjddddddddd	d
ddd
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�dr_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}?y�x�|>|kr��jT�\}@}A}B}!|@d;kr|>d7}>q�
n|Ar"|AGHn|Br?�
r?tj$|BIJntjjU�tj$jU�|!d tkrrtV�n|2|@|!��s��r�dyndz}C|Cj%|5|?|4t��|@�GHn|?d7}?q�
WWn!tVk
r�t}#�	j+�nXx�|<D]}=|=j�q�Wn�x�tW�d�D]�\}?}@�so�r9dyndz}C|Cj%|5|?|4t��|@�GHtjjU�n|
r�|0jXd{d|tY�d}tZ��n�ypt|@���d;�
�}!|2|@|!�|r
|!d t[kr
�
s�d~|@GHnt|@t��d;�
�nWn!tVk
r!
t}#Pn
�nX|rw
|j\�|j]rw
dGt|j]�Gd�GH|$j/|j]�|j]2qw
nxBtjEj^�D]1}D|D|1kr�
|Dj.d��r�
tj_|D�q�
q�
WqW|#r"�
r"Hd�GHtD|.�tD��tD��tD�
�}Et`t|E�d��Gd�GHta|E�n�r�r�
r�rd�
rd|#rdt��dkrdd�Gnt`t��d��Gd�GHn|r��jbd�t�d�GHx*�d� D]\}F}@d�|@|FfGHq�Wn�r��
r�t`t��d��Gd�GHta��n�r0�
r0d�j%t`t��d���GHta��n�
r��r��
r�t`t�
�d��Gd�GHta�
�tc�}"tj5}G|"jd�r�tD�
�|"je�tD��}H|Hr�t`t|H�d��Gd�G|GdDGHta|H�q�d�G|Gd�GHq�d�GHd�G|Gd�GHn|r��r�d�GHx��D]�}@d~|@GHtjjU�y(tt_ft|@t��d;�
�}IWntVk
rnHPqX|Id tgthtitjhkr�j|@�qqW�r�t`t��d��Gd�GHta��q�n|r|/rt(|%d���}&|&jk|/d��Wd;QXqtjl|%�n|
rF|0jm�}|jnd�td�td�|�n|rftjod�tjp��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(sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytaccumulate_result�s
c3s1x*tr,x|D]}|V�rdSqWqWdS(N(tTrue(ttestsR9(R=(sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyttest_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(sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/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�jd�\}}}|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(sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytwork	s,	


-

ttargets[{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
tshow_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(qRtrecord_original_stdoutRRPtgetopttargvterrorRRXtrandomt	randrangeRDtinttgct
set_thresholdR[tpathtjointgetcwdtsplittlentset_memlimittlowertRESOURCE_NAMEStFalsetremoveR3RYRatruntestRctINTERRUPTEDt	__class__t__name__RZRRQtformattImportErrortTEMPDIRtopentreadR_tclosetIOErrortSAVEDCWDt
startswithtextendtremovepytSTDTESTStNOTTESTStcopytaddtplatformtpython_implementationtversiont	byteordertflagst	findteststindext
IndexErrortseedtshuffleR"tTracetprefixtexec_prefixRLtsettmodulestlisttitert	threadingRGRHRRIRJtretcompiletargs_from_interpreter_flagst
executabletrangetstarttgettflushtKeyboardInterruptt	enumeratetrunctxRltvarsR5tcollecttgarbagetkeystunloadR2t	printlisttsortt_ExpectedSkipstisvalidtgetexpectedRR4R6R7R8twritetunlinktresultst
write_resultstsystemtgetpid(JREttestdirRRRRR tfromfileR!RLR"RuR$RKRt
print_slowtrandom_seedtuse_mpRR%R&R'toptstargsRtotaR}txtuR-R�tkwargsR:tetinterruptedt
found_garbagetfilenametfpt	next_testtlinetgutststdteststnotteststargtallteststselectedtnext_single_testttracertsave_modulesRCRFt
test_countttest_count_widthRGRHROtopt_argsRjtitworkerstworkertfinishedt
test_indexR9RPRQtfmttmoduletomittedttimetplattsurpriseR;((RJRIR=RfRgR>R?RKRhRiR'RR@RARBRERLRsf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytmain�s�"	

													



(

			
	

		





	%



				
		(




	
	


 

	

*
'




		 

	
	
ttest_grammarttest_opcodest	test_dictttest_builtinttest_exceptionst
test_typest
test_unittestttest_doctestt
test_doctest2Rttest_future1ttest_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�RtsplitextR3tsorted(	R�R�R�tnamesREtothersR\tmodnametext((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/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'((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyR��s	tsaved_test_environmentc	Bs�eZdZeZdeed�Zd#Zd�Zd
�Zd�Z	d�Z
d�Zd�Zd�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'((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyt__init__s			ssys.argvtcwds	sys.stdins
sys.stdouts
sys.stderrs
os.environssys.pathsasyncore.socket_maptfilescCsttj�tjtjfS(N(tidRRx(R((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytget_sys_argv#scCs|dt_|dtj(dS(Nii(RRx(Rt
saved_argv((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytrestore_sys_argv%s
cCs
tj�S(N(R[R�(R((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytget_cwd)scCstj|�dS(N(R[tchdir(Rt	saved_cwd((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytrestore_cwd+scCstjS(N(RRP(R((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytget_sys_stdout.scCs
|t_dS(N(RRP(Rtsaved_stdout((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytrestore_sys_stdout0scCstjS(N(RRQ(R((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytget_sys_stderr3scCs
|t_dS(N(RRQ(Rtsaved_stderr((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytrestore_sys_stderr5scCstjS(N(Rtstdin(R((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyt
get_sys_stdin8scCs
|t_dS(N(RR(Rtsaved_stdin((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytrestore_sys_stdin:scCs"ttj�tjttj�fS(N(RR[tenvironRM(R((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytget_os_environ=scCs2|dt_tjj�tjj|d�dS(Nii(R[R"tcleartupdate(Rt
saved_environ((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytrestore_os_environ?s

cCsttj�tjtjfS(N(RRR(R((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytget_sys_pathDscCs|dt_|dtj(dS(Nii(RR(Rt
saved_path((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytrestore_sys_pathFs
cCs+tjjd�}|r'|jj�p*iS(Ntasyncore(RR�R�t
socket_mapR�(RR+((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/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+((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytrestore_asyncore_socket_mapNscCsFtjjtj�rd}n$tjjtj�r<d}nd}|S(Ntftd(R[RtisfileRtTESTFNtisdirRX(RR:((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytget_test_support_TESTFNTs		cCsc|dkr_tjjtj�r4tjtj�q_tjjtj�r_tj	tj�q_ndS(N(
RXR[RR4RR5R�R6tshutiltrmtree(Rtsaved_value((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytrestore_test_support_TESTFN\s
cCs td�tjtj�D��S(Ncss1|]'}|tjj|�r$dndVqdS(t/RN(R[RR6(t.0tfn((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pys	<genexpr>ds(RR[Rtcurdir(R((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyt	get_filescs	cCsptj}||krl|d|krltjj|�rGtj|�qltjj|�rltj|�qlndS(NR<(RR5R[RR4R�R6R9(RR:R>((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyt
restore_filesfs	ccs^xW|jD]L}|jdd�}d|}d|}|t||�t||�fVq
WdS(NRqRetget_trestore_(t	resourcestreplacetgetattr(RR\t
method_suffixtget_nametrestore_name((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyt
resource_infons


cCs#td�|j�D��|_|S(Ncss'|]\}}}||�fVqdS(N((R=R\R�trestore((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pys	<genexpr>vs(RMRJtsaved_values(R((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyt	__enter__us	c
Cs�|j}|`x�|j�D]�\}}}|�}|j|�}	||	krt|_||	�|jr�|jr�tjdj	||j
�IJ|jdkr�|jr�tjdj	|	|�IJq�q�qqWtS(Ns Warning -- {} was modified by {}is  Before: {}
  After:  {} (
RLRJtpopRDtchangedRR'RRQR�RRR�(
Rtexc_typetexc_valtexc_tbRLR\R�RKtcurrenttoriginal((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyt__exit__zs"			
(	ssys.argvscwds	sys.stdins
sys.stdouts
sys.stderrs
os.environssys.pathsasyncore.socket_mapsfiles(R�t
__module__RR�ROR
RDRRRRRRRRRR!R#R'R(R*R-R1R7R;R@RARJRMRU(((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyR
�s:																						c	CsRtj|�|rd}ntj�}d}t}y�tj}z�|rU|t_n|jd�rm|}	n
d|}	t||||���}
t	j	�}t
|	t�t�g�}t
||�}
t
|
dd�}|dk	r�|�n|rt|
|||�}nt	j	�|}WdQXWd|t_XWn�tjk
rz}|rp|rp|GdG|GHtjj�nt|fStjk
r�}|r�|r�|GdG|GHtjj�nt|fStk
r��nztjk
r%}|stjdI|IdI|IJntjj�t|fStj�d \}}|svtjdI|IdIt|�d	I|IJntjj�|r�|r�tjd
tj�tjj�nt|fSX|r�t|fS|
jr�t|fS|s�|r�t|fS|j �}|st|fSdG|GdGHdd
GH|GHdd
GHtjj�t|fSdS(Ngstest.t	test_mains
skipped --R9s	failed --is
crashed --R(tfilesproduced unexpected output:t*iF(!RR�RXtStringIOR�RRPR�R
R�t
__import__RlRmRFtdash_RtResourceDeniedR�R8tunittesttSkipTestR7R�t
TestFailedRQR5texc_infotstrt	tracebackt	print_excROR6R4tgetvalue(R9RRRKR'tcapture_stdoutR<trefleaktsave_stdouttabstesttenvironmentt
start_timetthe_packaget
the_modulet
indirect_testRttypetvalueRh((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/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	directoryRXs8os.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�RR5R[RtexistsR6R8R9R4R�tSystemErrorthasattrRstS_IRWXUtS_IRWXGtS_IRWXOt	ExceptionRRQ(RRRtR}R\tkindtnukerR((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyR	�s,
	

$
cs�ddl}ddl}ddl}ttd�sBtd��ntj}|jj	�}tj
j	�}	yddl}
Wntk
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(((Rn(sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pytrun_the_test*scstj��dS(N(timptreload((Rm(sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyR�-st	beginningtrepetitionst
1234567890i
iRqs%s leaked %s references, sum=%sR�($tcopy_regt_abcollt_pyioRwRR{twarningstfilterstdispatch_tableR�tpath_importer_cachet	zipimportR�RXt_zip_directory_cachet__all__RFt__subclasses__RR[RR�RR�RQtdash_R_cleanupR�R~R�R3tanytsumR�R�RDR�(RmR9RnRKR�R�R�tfstpstpicR�tzdctabcsR�tmodR�tabctobjR�tdeltastnwarmuptntrackedtfnametrepcountR�t	rc_beforetrc_afterRtrefrep((RnRmsf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyR\	sZ$


9


cCslddl}ddl}ddl}ddl}tjddt�}	ddl}
ddl}ddl	}ddl
}
ddl}ddl}ddl
}ddlm}x/tjj�D]}t|d�r�|`q�q�W|tj(|jj�|jj|�tjj�tjj|�yddl}Wntk
rBnX|jj�|jj|�tj�xC|j�D]5\}}|j �|_!|j"j�|j#j�qwW|j�t$j%�|j&j�|
j'�|j(�|j)d�|	j+�|j,�|
j-�|j.j�|j/�d|_0yddl1}Wntk
rSnX|j2�|j3�dS(Ni����tdircachet
deprecated(t
_path_createdt__warningregistry__(4R}R�t	_strptimet	linecacheRt
import_moduleRDturlparseturllibturllib2t	mimetypestdoctesttstructtfilecmptdistutils.dir_utilR�RR�tvaluesRwR�R�R�R�R$R%R�R�R�R�t_clear_type_cachetitemsR�Rt
_abc_cachet_abc_negative_cacheR�tpurget_regex_cachetclear_cachet
urlcleanuptinstall_openerRXtresett
clearcachet_default_mime_typest_cachet_clearcachetmastertctypest_reset_cacheR�(R�R�R�R�R�R}R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�tregistryR�((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyR�IsV<


















	

cCs|ptjjt�ptjS(N(R[RtdirnameRR?(R((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyR�scCs\|s
dSxKt|�D]=\}}tjj|�\}}|dkr|||<qqWdS(Ns.py(R�R[RR(RtidxR\tbasenameR((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyR��scCs,|dkrd||fSd||fSdS(Nis%d %ss%d %ss((tntword((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyR2�siFicCsQddlm}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(Rb(R=telt((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pys	<genexpr>�stinitial_indenttsubsequent_indentN(ttextwrapR�R�R(R�twidthtindentR�tblanks((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/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�|jj
s�|j
jd�n|jr�|j
jd�ntjdkr�|j
jd�ntjdkrd	d
ddd
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����(ttest_timeoutttest_linuxaudiodevttest_pep277R�l����ttest_imageopRt
test_macosttest_macostoolsttest_aepackt
test_plistlibttest_scriptpackagesttest_applesingleusunicode-internaliRttest_unicode_filettest_winregt
test_winsoundttest_startfilettest_sqlitettest_msilibtirixttest_alttest_cdttest_clttest_glttest_imgfileR�ttest_sunaudiodevttest_nist
test_py3kwarn(tos.pathR9R�R�tvalidRR�t
_expectationsR�R�texpectedR�Rtsupports_unicode_filenamest
skip_expectedtmaxintR�tencodetpy3kwarningRD(RR[R�tstMAC_ONLYRptWIN_ONLYt	IRIX_ONLY((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyR
�sL	
			


	cCs|jS(s@Return true iff _ExpectedSkips knows about the current platform.(R�(R((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyR�scCs|jS(snReturn set of test names we expect to skip on current platform.

        self.isvalid() must be true.
        (R(R((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyR�#s(R�RVR
R�R�(((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyR��s	7	t__main__tsrcdirtbuildstest_python_{}R(NRRZRwRYR[RzR�R8RR�RcR�R^ttempfileR�R�t	sysconfigR�t
itervaluesR�RwRRtabspathRtresourceR�t	getrlimittRLIMIT_STACKtsoftthardtmintmaxtnewsoftt	setrlimittFixTkR{R4R5R6R7R8R�R9RR�t
gettempdirR�RRXR�R�R�R�R�R�R
RR	R\R�RR�R2R�R�R�R�tis_python_buildR�tget_config_varRutmkdirR�R�tTESTCWDttemp_cwdRD(((sf/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/regrtest.pyt<module>�s�
.	

	��		
&�O	'	@	<		"	!
E