config root man

Current Path : /usr/local/lib/python2.5/test/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/local/lib/python2.5/test/test_dummy_thread.pyc

³ò
h”Rc	@sËdZddkaddkZddkZddkZddkZddklZda	dei
fd„ƒYZdei
fd„ƒYZd	ei
fd
„ƒYZ
dd„ZedjoeƒndS(
sÕGeneric thread tests.

Meant to be used by dummy_thread and thread.  To allow for different modules
to be used, test_main() can be called with the module to use as the thread
implementation as its sole argument.

iÿÿÿÿN(ttest_supportit	LockTestscBs_eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„ZRS(
sTest lock objects.cCstiƒ|_dS(N(t_threadt
allocate_locktlock(tself((s2/usr/local/lib/python2.5/test/test_dummy_thread.pytsetUpscCs|i|iiƒdƒdS(Ns(Lock object is not initialized unlocked.(t
failUnlessRtlocked(R((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyt
test_initlockscCs8|iiƒ|iiƒ|i|iiƒdƒdS(Ns%Lock object did not release properly.(RtacquiretreleaseRR(R((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyttest_releases

cCs|iti|iiƒdS(N(tfailUnlessRaisesRterrorRR(R((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyttest_improper_release%scCs |i|iidƒdƒdS(Nis)Conditional acquiring of the lock failed.(RRR
(R((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyttest_cond_acquire_success)scCs1|iidƒ|i|iidƒdƒdS(Nis=Conditional acquiring of a locked lock incorrectly succeeded.(RR
R(R((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyttest_cond_acquire_fail.scCs*|iiƒ|i|iiƒdƒdS(NsUncondional locking failed.(RR
RR(R((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyttest_uncond_acquire_success5s
cCsB|i|iidƒtjdƒ|i|iiƒtjƒdS(Nis*Unconditional locking did not return True.(RRR
tTrue(R((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyttest_uncond_acquire_return_val;scCs©d„}|iiƒttiƒƒ}ti||itfƒtioHdtGHn|iiƒttiƒƒ}tio	dGHn|i	||tjdƒdS(NcSsti|ƒ|iƒdS(s:Hold on to lock for a set amount of time before unlocking.N(ttimetsleepR(t	to_unlocktdelay((s2/usr/local/lib/python2.5/test/test_dummy_thread.pytdelay_unlockCs
s@*** Waiting for thread to release the lock (approx. %s sec.) ***tdones+Blocking by unconditional acquiring failed.(
RR
tintRRtstart_new_threadtDELAYRtverboseR(RRt
start_timetend_time((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyttest_uncond_acquire_blockingAs	




	(t__name__t
__module__t__doc__RR	RRRRRRR!(((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyRs								t	MiscTestscBs;eZdZd„Zd„Zd„Zd„Zd„ZRS(sMiscellaneous tests.cCs|ittiƒdS(N(R
t
SystemExitRtexit(R((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyt	test_exitYscCs?|ittiƒtƒdƒ|itiƒdjdƒdS(Ns*_thread.get_ident() returned a non-integeris_thread.get_ident() returned 0(Rt
isinstanceRt	get_identR(R((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyt
test_ident]scCs&|ittiƒtiƒdƒdS(NsR_thread.LockType is not an instance of what is returned by _thread.allocate_lock()(RR)RRtLockType(R((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyt
test_LockTypedscCs)d„}|itti|tƒƒdS(NcSstiƒdS(N(Rtinterrupt_main(((s2/usr/local/lib/python2.5/test/test_dummy_thread.pytcall_interruptms(R
tKeyboardInterruptRRttuple(RR/((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyttest_interrupt_mainjs	cCs|ittiƒdS(N(R
R0RR.(R((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyttest_interrupt_in_mainrs(R"R#R$R(R+R-R2R3(((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyR%Vs				tThreadTestscBs eZdZd„Zd„ZRS(sTest thread creation.cCsttd„}tidƒ}ti||ttfƒ|iƒ}|i|do|ddƒti|tƒh|d<td<td<ƒ|iƒ}|i|do|ddƒti||tfhtd<ƒ|iƒ}|i|do|dd	ƒdS(
NcSs|i||fƒdS(s<Use to test _thread.start_new_thread() passes args properly.N(tput(tqueuetarg1targ2((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyt
arg_tester|siis7Argument passing for thread creation using tuple failedR6R7R8s8Argument passing for thread creation using kwargs failedsGArgument passing for thread creation using both tuple and kwargs failed(tFalsetQueueRRRtgetRR1(RR9t
testing_queuetresult((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyttest_arg_passingzs"cCsÙd„}d}ti|ƒ}tioHdt|fGHnxPt|ƒD]B}tottiƒdƒ}nd}ti|||fƒqIWt	i
tƒtio	dGHn|i|iƒ|jd|tfƒdS(NcSs$ti|ƒ|itiƒƒdS(s@Wait for ``delay`` seconds and then put something into ``queue``N(RRR5RR*(R6R((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyt
queue_mark’s
isJ*** Testing multiple thread creation (will take approx. %s to %s sec.) ***iiRs2Not all %s threads executed properly after %s sec.(
R;RRRtxrangetroundtrandomRRRRRtqsize(RR@tthread_countR=tcounttlocal_delay((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyttest_multi_creations(	

	

	(R"R#R$R?RH(((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyR4ws	cCsF|o|adantioHdtGHntitttƒdS(Nis"*** Using %s as _thread module ***(RRRRtrun_unittestRR%R4(timported_module((s2/usr/local/lib/python2.5/test/test_dummy_thread.pyt	test_main«s


t__main__(R$tdummy_threadRRR;RCtunittestttestRRtTestCaseRR%R4tNoneRKR"(((s2/usr/local/lib/python2.5/test/test_dummy_thread.pys<module>sD!4



Man Man