Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/test/
Upload File :
Current File : //usr/lib/python2.7/test/regrtest.pyc


|_c@sdZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZx~ejjD]mZeedr
gejD]Zejje^qe_needr7ejjeje_nqWejdkryddlZWnek
rmnNXejej\ZZeeeeddZ ej!eje efndZ"d	Z#dZ$d
Z%dZ&dZ'dd
l(m)Z)dddddddddddfZ*ejjej+Z,ddZ-e.e.d	e/e/e/e/e.e/e.e/de/e/e/e/e.e.e/e/e/dZ0dddd d!d"d#d$d%g	Z1d&d'd(hZ2e.e1e2d)Z3e/e.d*Z4d+fd,YZ5e/d-Z6d.Z7d/Z8d0Z9e.d1Z:d2Z;d3Z<d4d5d6Z=id7d86d9d:6d;d<6d;d=6d>d?6d@dA6dBd6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6dQdR6dSdT6Z>e>dNe>dU<e>dNe>dV<e>dNe>dW<e>dNe>dX<dYfdZYZ?e@d[krejjeZeejjejAd	ksAtBejCrejjDejEd\d]Z,ejje,Z,ejjFe,rejGe,nnd^jHejIZJejjDe,eJZJe)jKeJd_eLe0WdQXndS(`s
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/--random     -- 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


Additional Option Details:

-r randomizes test execution order. You can use --randseed=int to provide a
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'.
iNt__path__t__file__tdarwiniiiiiii(ttest_supporttaudiotcursest	largefiletnetworktbsddbtdecimaltcput
subprocessturlfetchtguitxpickletcCs$tGH|r|GHntj|dS(N(t__doc__tsystexit(tcodetmsg((s#/usr/lib/python2.7/test/regrtest.pytusagestcoveragecEs!tjtjyntjtjddddddddd	d
ddd
dddddddddddddg\}}Wn#tjk
r}td|nX|d:krt	j
d}nd:krgnxq|D]i\}}|dkrtdq|dkr
d7
q|dkr1t}q|dkrFt}q|dkrat	d
q|dkrvt}q|dkrt}q|dkrt}q|dkrt}q|d0krt|}q|dkr|}q|dkrt}q|dkrt}q|dkr=d9d:l
}|jt|q|dkrRt}
q|dkr|tjjtj|}q|dkrd:}q|dkr]|jdCtdkr|GGHtddEndsdFd<ntdd<dsdGd<ntdd<tdksJdrGdHgd)qGq|dkrytj|q|dkrdg|jdMD]}|j^q}x|D]}|dNkrt(qnt}|ddOkrt}|d}n|tkrtddP|n|rA|kr]j|q]q|krj|qqWq|dkryt}q|dkrt|}q|dUkrt}q|dVkr$tj|\}}yt||} Wn%tk
r}!t|!j j!f} nXHtj"| GHtj#dqtj$dWj%|IJtj#dqW|rg|rgtddXn|r|
rtddYn|r|rtddZng
ggggt}"|ryd9d:l
}Wnt&k
rd[GHt}qXg}#n|rktjjt'd\}$y8t(|$d]}%|%j)j*}&|&g|%j+Wqkt,k
rgqkXn|rgt(tjjtj-|}%xD|%D]<}'|'j}(|(r|(dj.d^rj/|(qqW|%j+nt0|t0t1})t2j3}*|rYx7|D]/}+|+|)kr?|)j|+n|*j4|+qWg}n
s~|s~	pz|pzpz|rd_Gt5j6Gd`jtj7jGHdaGt5j5dbtGdctj8GHdaGtjGHddGtj9GHnt:||)|*},p|p|,}-|rQ|-d }-y|,|,j;|-dd}.WqQt<k
rMd:}.qQXn|r}t	j=|deG|GHt	j>|-n|
rd9d:l?}
|
j@dftjAtjBgdtdgt}/ngt_CtjDjE}0
fdh}1|r"	tF|-fdi}2|2ntG|-|rMyd9djlHmI}3Wn#t&k
rm	dkGHtj#dnXd9dllJmJ}4d9dmlKmLmMtNjOdn|4
	fdo}5|5tjP}6tjQg|6dpdqg	fdr}7gtR|D]}8|3ds|7^q$
}9x|9D]}:|:jSqF
Wd};yx|;|kr	jT\}<}=}>} |<d:kr
|;d7};qf
n|=r
|=GHn|>r
tj$|>IJn| dtkr
| ddtks
tUtVn|1|<| qf
WWn!tVk
r.t}"j+nXx|9D]}:|:jq6WndxaD]Y}<	su|<GHtjjWn|
r|/jXdudvtYdwtZny[t|<
	} |1|<| |r| dt[krdx|<GHt|<t	nWn!tVk
rt}"Pn
nX|rh|j\|j]rhdyGt|j]GdzGH|#j/|j]|j]2qhnxBtjDjED]1}?|?|0krx|?j.d{rxtj^|?qxqxWqTW|"r
Hd|GHt_|-t_
t_t_}@t`t|@d}Gd~GHta|@n
rb
	rb
rG
rG
|"rG
t
dkrG
dGnt`t
d}GdGHn|r
jbdtdGHx*d D]\}A}<d|<|AfGHq
Wnr$t_t_r
t`td}GdGHtanr$dj%t`td}GHtaq$nr	rt`td}GdGHtatc}!tj5}B|!jdrt_|!jet_}C|Crt`t|CdGdG|BdCGHta|CqdG|BdGHqdGHdG|BdGHn|reredGHxhD]]}<dx|<GHtjjWy"tt_ft|<t	}DWqtVk
rTHPqqXqWn|r|.rt(|$d}%|%jg|.dWd:QXqtjh|$n|
r|/ji}|jjdtdtd|n|rtjkdtjlntj#tdkp|"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:thelptverbosetverbose2tverbose3tquiettexcludetsingletslowtrandomtfromfilet	findleakssuse=s
threshold=ttraces	coverdir=t
nocoverdirtrunleaksshuntrleaks=s	memlimit=s	randseed=s
multiprocess=s
slaveargs=tforevertheaderiis-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--thresholdiNs-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--slaveargssQNo 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|tkrWj|nn|tkrj|j|nE|tkrj|n)|tkrj|j|ndS(N(tappendtPASSEDtFAILEDtENV_CHANGEDtSKIPPEDtRESOURCE_DENIED(ttesttresulttokt	test_time(tgoodt
test_timestbadtresource_deniedstenvironment_changedtskipped(s#/usr/lib/python2.7/test/regrtest.pytaccumulate_results

c3s1x*tr,x|D]}|VrdSqWqWdS(N(tTrue(ttestsR8(R>(s#/usr/lib/python2.7/test/regrtest.pyttest_forevers
	
(tThreads+Multiprocess option requires thread support(tQueue(tPopentPIPEs
\[\d+ refs\]$c3sDx=D]5}|ftddf}||fVqWdS(Nt
huntrleakst
use_resources(tdict(R8t
args_tuple(RDRRKRRJ(s#/usr/lib/python2.7/test/regrtest.pyttests_and_argss
s-ms
test.regrtestcsUy-x&tr+yt\}}Wntk
rCjd	dSXdtj|gdddtdtjdk}|j	\}}j
d|}|jjd\}}}|sjd
dStj
|}s|d|}nj||j|j|fqWWn!tk
rPjdnXdS(Ns--slaveargststdouttstderrtuniversal_newlinest	close_fdstntRs
(NNNN(NNNN(NNNN(RCtnextt
StopIterationtputtNonetjsontdumpstostnametcommunicatetsubtstript
rpartitiontloadstrstript
BaseException(R8RMtpopenRORPt_R9(RItbase_cmdRHRtdebug_output_pattoutputtpending(s#/usr/lib/python2.7/test/regrtest.pytworks0	


-

ttargettKeyboardInterruptsruntest(test, verbose, quiet)tglobalstlocalss"Re-running test %r in verbose modesWarning: test createdsuncollectable object(s).stest.s(Test suite interrupted by signal SIGINT.R8somitted: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 modetws
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(mRtrecord_original_stdoutRROtgetopttargvterrorRRWRt	randrangeRCtinttgct
set_thresholdRZtpathtjointgetcwdtsplittlentset_memlimittlowertRESOURCE_NAMEStFalsetremoveR2RXR`truntestRbtINTERRUPTEDt	__class__t__name__RYRRPtformattImportErrortTEMPDIRtopentreadR^tclosetIOErrortSAVEDCWDt
startswithtextendtremovepytSTDTESTStNOTTESTStcopytaddtplatformtpython_implementationtversiont	byteordertflagst	findteststindext
IndexErrortseedtshuffleR"tTracetprefixtexec_prefixRKtmodulestkeystlisttitert	threadingRFRGRRHRItretcompiletargs_from_interpreter_flagst
executabletrangetstarttgettAssertionErrorRktflushtrunctxRltvarsR4tcollecttgarbagetunloadtsetR1t	printlisttsortt_ExpectedSkipstisvalidtgetexpectedRtwritetunlinktresultst
write_resultstsystemtgetpid(ERDttestdirRRRRt	randomizeR R!RKR"RuR$RJRt
print_slowtrandom_seedtuse_mpRR%R&toptstargsRtotaR|txtuR,RtkwargsR9tetinterruptedt
found_garbagetfilenametfpt	next_testtlinetgutststdteststnotteststargtallteststselectedtnext_single_testttracertsave_modulesRBRERFRGRNtopt_argsRititworkerstworkertfinishedR8RORPtmoduletomittedttimetplattsurpriseR:((RhRDRAR@RKR>RHRgR=RRRIReR<RfR?RJs#/usr/lib/python2.7/test/regrtest.pytmainsd	

													



(

		
	

		





	%



		
		!(

	



	

	
*

'


		 


	
	
ttest_grammarttest_opcodest	test_dictttest_builtinttest_exceptionst
test_typest
test_unittestttest_doctestt
test_doctest2Rttest_future1ttest_future2c	Cst|}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(tfindtestdirRZtlistdirRR~tsplitextR2tsorted(	RRRtnamesRDtothersR[tmodnametext((s#/usr/lib/python2.7/test/regrtest.pyRs
(cCsM|t_|dk	r!|t_nzt||||SWdt||XdS(sRun 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
    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(RRRWRKt
runtest_innertcleanup_test_droppings(R8RRRJRK((s#/usr/lib/python2.7/test/regrtest.pyRs	tsaved_test_environmentcBseZdZeZdedZdZdZdZd
Z	dZ
dZdZdZ
dZdZdZdZdZdZdZdZdZdZdZdZRS(sSave 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(ttestnameRR(tselfRRR((s#/usr/lib/python2.7/test/regrtest.pyt__init__s		ssys.argvtcwds	sys.stdins
sys.stdouts
sys.stderrs
os.environssys.pathsasyncore.socket_mapcCsttjtjtjfS(N(tidRRx(R((s#/usr/lib/python2.7/test/regrtest.pytget_sys_argvscCs|dt_|dtj(dS(Nii(RRx(Rt
saved_argv((s#/usr/lib/python2.7/test/regrtest.pytrestore_sys_argvs
cCs
tjS(N(RZR(R((s#/usr/lib/python2.7/test/regrtest.pytget_cwdscCstj|dS(N(RZtchdir(Rt	saved_cwd((s#/usr/lib/python2.7/test/regrtest.pytrestore_cwdscCstjS(N(RRO(R((s#/usr/lib/python2.7/test/regrtest.pytget_sys_stdoutscCs
|t_dS(N(RRO(Rtsaved_stdout((s#/usr/lib/python2.7/test/regrtest.pytrestore_sys_stdoutscCstjS(N(RRP(R((s#/usr/lib/python2.7/test/regrtest.pytget_sys_stderrscCs
|t_dS(N(RRP(Rtsaved_stderr((s#/usr/lib/python2.7/test/regrtest.pytrestore_sys_stderr
scCstjS(N(Rtstdin(R((s#/usr/lib/python2.7/test/regrtest.pyt
get_sys_stdinscCs
|t_dS(N(RR(Rtsaved_stdin((s#/usr/lib/python2.7/test/regrtest.pytrestore_sys_stdinscCs"ttjtjttjfS(N(R	RZtenvironRL(R((s#/usr/lib/python2.7/test/regrtest.pytget_os_environscCs2|dt_tjjtjj|ddS(Nii(RZRtcleartupdate(Rt
saved_environ((s#/usr/lib/python2.7/test/regrtest.pytrestore_os_environs

cCsttjtjtjfS(N(R	RR~(R((s#/usr/lib/python2.7/test/regrtest.pytget_sys_pathscCs|dt_|dtj(dS(Nii(RR~(Rt
saved_path((s#/usr/lib/python2.7/test/regrtest.pytrestore_sys_paths
cCs+tjjd}|r'|jjp*iS(Ntasyncore(RRRt
socket_mapR(RR$((s#/usr/lib/python2.7/test/regrtest.pytget_asyncore_socket_map"scCsEtjjd}|dk	rA|jdt|jj|ndS(NR$t
ignore_all(RRRRWt	close_allRCR%R(Rt	saved_mapR$((s#/usr/lib/python2.7/test/regrtest.pytrestore_asyncore_socket_map&sccs^xW|jD]L}|jdd}d|}d|}|t||t||fVq
WdS(NRqRdtget_trestore_(t	resourcestreplacetgetattr(RR[t
method_suffixtget_nametrestore_name((s#/usr/lib/python2.7/test/regrtest.pyt
resource_info,s


cCs#td|jD|_|S(Ncss'|]\}}}||fVqdS(N((t.0R[Rtrestore((s#/usr/lib/python2.7/test/regrtest.pys	<genexpr>4s(RLR3tsaved_values(R((s#/usr/lib/python2.7/test/regrtest.pyt	__enter__3s	c
Cs|j}|`x|jD]\}}}|}|j|}	||	krt|_||	|jstjdj||j	IJ|j
dkrtjdj|	|IJqqqqWtS(Ns Warning -- {} was modified by {}is  Before: {}
  After:  {} (R6R3tpopRCtchangedRRRPRRRR(
Rtexc_typetexc_valtexc_tbR6R[RR5tcurrenttoriginal((s#/usr/lib/python2.7/test/regrtest.pyt__exit__8s"			
	(ssys.argvscwds	sys.stdins
sys.stdouts
sys.stderrs
os.environssys.pathsasyncore.socket_map(Rt
__module__RRR9RR-R
RR
RRRRRRRRR R!R#R&R*R3R7R?(((s#/usr/lib/python2.7/test/regrtest.pyRs0																		c	Cs&tj||rd}ntj}d}t}ytj}z|rU|t_n|jdrm|}n
d|}t|||}	t	j	}
t
|ttg}t
||}t
|dd}
|
dk	r|
n|rt|||
|}nt	j	|
}WdQXWd|t_XWnbtjk
ro}|se|GdG|GHtjjnt|fStjk
r}|s|GdG|GHtjjnt|fStk
rnatjk
r	}tjdI|IdI|IJtjjt|fStjd \}}tjdI|IdIt|d	I|IJtjj|rtjd
tjtjjnt|fSX|rt|fS|	jrt|fS|s|rt|fS|j }|st|fSdG|GdGHdd
GH|GHdd
GHtjjt|fSdS(Ngstest.t	test_mains
skipped --R8s	failed --is
crashed --R'tfilesproduced unexpected output:t*iF(!RRRWtStringIORRRORRRt
__import__RlRmR/tdash_RtResourceDeniedRR7tunittesttSkipTestR6Rkt
TestFailedRPR4texc_infotstrt	tracebackt	print_excR9R5R3tgetvalue(R8RRRJtcapture_stdoutR;trefleaktsave_stdouttabstesttenvironmentt
start_timetthe_packaget
the_modulet
indirect_testRttypetvalueRg((s#/usr/lib/python2.7/test/regrtest.pyRQs
			








/

	



		
c	CsMddl}ddl}ddl}|jxtjdfD]}tjj|s\q>ntjj	|rd|j
}}n5tjj|rdtj}}nt
d||rd|||fGHnyAttdrtj||j|jB|jBn||Wq>tk
rD}tjd||||fIJq>Xq>WdS(	Nitdb_homet	directoryRBs8os.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(tshutiltstatR|RRtTESTFNRZR~texiststisdirtrmtreetisfileRtSystemErrorthasattrR]tS_IRWXUtS_IRWXGtS_IRWXOt	ExceptionRRP(	RRR^R_R|R[tkindtnukerR((s#/usr/lib/python2.7/test/regrtest.pyRs.
	

$
csddl}ddl}ddl}ttdsBtdntj}|jj	}tj
j	}	yddl}
Wntk
rd}nX|
jj	}i}||f}
xg|
D]%}|jD]}t||^qqD]L}t|dsqnx.|j|gD]}|jj	||<qWqWrPfd}nfd}g}|\}}}tjjtj|}||}tjdI|Id	IJtjd
|dd| IJt|||	||xyt|D]k}tj}|tjjd
t|||	||tj}||kr|j||qqWtjJt|rd||t|f}tj|IJt |d}||IJ|j!WdQXt"St#S(sRun a test multiple times, looking for reference leaks.

    Returns:
        False if the test didn't leak references; True if we detected refleaks.
    iNtgettotalrefcounts9Tracking reference leaks requires a debug build of Pythont
_abc_registrycsdS(N(((RX(s#/usr/lib/python2.7/test/regrtest.pytrun_the_testscstjdS(N(timptreload((RW(s#/usr/lib/python2.7/test/regrtest.pyRost	beginningtrepetitionst
1234567890i
iRqs%s leaked %s references, sum=%sR($tcopy_regt_abcollt_pyioRfRRjtwarningstfilterstdispatch_tableRtpath_importer_cachet	zipimportRRWt_zip_directory_cachet__all__R/t__subclasses__RnRZR~RRRRPtdash_R_cleanupRRmRR2tanytsumRRRCR(RWR8RXRJRuRvRwtfstpstpicR|tzdctabcsRtmodRtabctobjRotdeltastnwarmuptntrackedtfnametrepcountRt	rc_beforetrc_afterRtrefrep((RWRXs#/usr/lib/python2.7/test/regrtest.pyRFsZ$


9


cCslddl}ddl}ddl}ddl}tjddt}	ddl}
ddl}ddl	}ddl
}
ddl}ddl}ddl
}ddlm}x/tjjD]}t|dr|`qqW|tj(|jj|jj|tjjtjj|yddl}Wntk
rBnX|jj|jj|tjxC|jD]5\}}|j |_!|j"j|j#jqwW|jt$j%|j&j|
j'|j(|j)d|	j+|j,|
j-|j.j|j/d|_0yddl1}Wntk
rSnX|j2|j3dS(Nitdircachet
deprecated(t
_path_createdt__warningregistry__(4R|Rut	_strptimet	linecacheRt
import_moduleRCturlparseturllibturllib2t	mimetypestdoctesttstructtfilecmptdistutils.dir_utilRRRtvaluesRfRRxRyRzRRR{R|RR}t_clear_type_cachetitemsRRnt
_abc_cachet_abc_negative_cacheRtpurget_regex_cachetclear_cachet
urlcleanuptinstall_openerRWtresett
clearcachet_default_mime_typest_cachet_clearcachetmastertctypest_reset_cacheR(RRRRRR|RuRRRRRRRRRRRRR|RtregistryR((s#/usr/lib/python2.7/test/regrtest.pyRsV<


















	

cCs|ptjjtptjS(N(RZR~tdirnameRtcurdir(R~((s#/usr/lib/python2.7/test/regrtest.pyRBscCs\|s
dSxKt|D]=\}}tjj|\}}|dkr|||<qqWdS(Ns.py(t	enumerateRZR~R(RtidxR[tbasenameR((s#/usr/lib/python2.7/test/regrtest.pyREscCs,|dkrd||fSd||fSdS(Nis%d %ss%d %ss((tntword((s#/usr/lib/python2.7/test/regrtest.pyR1MsiFicCsQddlm}d|}|djdt|D|d|d|GHdS(sPrint 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(RL(R4telt((s#/usr/lib/python2.7/test/regrtest.pys	<genexpr>^stinitial_indenttsubsequent_indentN(ttextwrapRRR(RtwidthtindentRtblanks((s#/usr/lib/python2.7/test/regrtest.pyRSs
%sZ
        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_threadsignals
        test_timing
        test_wait3
        test_wait4
        twin32s
        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
        tnetbsd3tfreebsd5tfreebsd6tfreebsd7tfreebsd8RcBs#eZdZdZdZRS(cCs0ddl}ddlm}t|_tjtkr,ttj}t|j	|_
|j
jd|jj
s|j
jdn|jr|j
jdntjdkr|j
jdntjdkrd	d
ddd
dg}xO|D]}|j
j|qWn.tdjddkr<|j
jd
ntjdkrddddddg}x!|D]}|j
j|qjWntjdkrddddddg}x!|D]}|j
j|qWntjdkr|j
jd |j
jd!ntjs |j
jd"nt|_ndS(#Ni(ttest_timeoutttest_linuxaudiodevttest_pep277Rlttest_imageopRt
test_macosttest_macostoolsttest_aepackt
test_plistlibttest_scriptpackagesttest_applesingleusunicode-internaliRttest_unicode_filettest_winregt
test_winsoundttest_startfilettest_sqlitettest_msilibtirixttest_alttest_cdttest_clttest_glttest_imgfileRttest_sunaudiodevttest_nist
test_py3kwarn(tos.pathR8RRtvalidRRt
_expectationsRRtexpectedRR~tsupports_unicode_filenamest
skip_expectedtmaxintRtencodetpy3kwarningRC(RRZRtstMAC_ONLYRptWIN_ONLYt	IRIX_ONLY((s#/usr/lib/python2.7/test/regrtest.pyRsL	
			


	cCs|jS(s@Return true iff _ExpectedSkips knows about the current platform.(R(R((s#/usr/lib/python2.7/test/regrtest.pyRscCs|jst|jS(snReturn set of test names we expect to skip on current platform.

        self.isvalid() must be true.
        (RRR(R((s#/usr/lib/python2.7/test/regrtest.pyRs(RR@RRR(((s#/usr/lib/python2.7/test/regrtest.pyRs	7	t__main__tsrcdirtbuildstest_python_{}R(MRRDRwRXRZRRRRRMRxRHttempfileRpRt	sysconfigRt
itervaluesRRfRR~tabspathRtresourceRt	getrlimittRLIMIT_STACKtsoftthardtmintmaxtnewsoftt	setrlimitR3R4R5R6R7RR8RRt
gettempdirRRRWRRRRRRRRRRFRRRR1RRRRRxRtis_python_buildRtget_config_varRatmkdirRRtTESTCWDttemp_cwdRC(((s#/usr/lib/python2.7/test/regrtest.pyt<module>s
.	
			
#xM	(	@	<		!	!
E%