HEX
Server: Apache
System: FreeBSD www860.sakura.ne.jp 13.0-RELEASE-p14 FreeBSD 13.0-RELEASE-p14 #2: Mon Dec 9 13:54:55 JST 2024 root@www5301.sakura.ne.jp:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
User: yoyo0427 (1306)
PHP: 8.3.8
Disabled: NONE
Upload Files
File: //usr/local/lib/python2.7/ctypes/test/__init__.pyc
�
P��ac@sddlZddlZddlZddlZddlZgZddlZee�Zd�Z	dej
fd��YZd�ZiZ
dd�Zd�Zdd�Zd	�Zd
�Zdejfd��YZd
�Zd�Zddd��YZdS(i����NcCstj|tkdj|��S(Ns{!r} is required(tunittestt
skipUnlesstctypes_symbolstformat(tname((s0/usr/local/lib/python2.7/ctypes/test/__init__.pytneed_symbolstResourceDeniedcBseZdZRS(s�Test skipped because it requested a disallowed resource.

    This is raised when a test calls requires() for a resource that
    has not be enabled.  Resources are defined by test modules.
    (t__name__t
__module__t__doc__(((s0/usr/local/lib/python2.7/ctypes/test/__init__.pyR
scCs`tj�jjjd�dkr%tStdk	oF|tkpFdtk}|s\dt|<n|S(skTest whether a resource is enabled.

    If the caller's module is __main__ then automatically return True.Rt__main__t*N(	tsyst	_getframetf_backt	f_globalstgettTruet
use_resourcestNonet_unavail(tresourcetresult((s0/usr/local/lib/python2.7/ctypes/test/__init__.pytis_resource_enableds!
cCs]tj�jjjd�dkr%dSt|�sY|dkrJd|}nt|��ndS(s�Raise ResourceDenied if the specified resource is not available.

    If the caller's module is __main__ then automatically return True.RR
Ns$Use of the `%s' resource not enabled(RR
RRRRRR(Rtmsg((s0/usr/local/lib/python2.7/ctypes/test/__init__.pytrequires!s!
ccsddl}t|d�r�t|jd�r�|jjdtjj�}tjj||�}x�|jj	j
�D]B}|j||�rptjj|�djtjjd�VqpqpWn^|j
d}xNtj|�D]=}|j||�r�d|jtjj|�dfVq�q�WdS(Ni����t
__loader__t_filest.is%s.%s(tfnmatchthasattrRRtreplacetostpathtseptjoinRtiterkeystfnmatchcasetsplitextt__path__tlistdir(tpackagetmaskRR!tfnm((s0/usr/local/lib/python2.7/ctypes/test/__init__.pytfind_package_modules.s1
cCskg}g}xRt||�D]A}|jd�d|krn|j|�|dkrtjd|IJqqny"t|t�t�dg�}WnRtt	j
fk
r�}|j|�|dkrtjd||fIJqqnXxut|�D]g}	|	jd�r
q�nt
||	�}
t|
�tt	j�kr�t|
t	j�r�|j|
�q�q�WqW||fS(s@Return a list of skipped test modules, and a list of test cases.Ri����isSkipped %s: excludedRsSkipped %s: %st_(R,tsplittappendRtstderrt
__import__tglobalstlocalsRRtSkipTesttdirt
startswithtgetattrttypetTestCaset
issubclass(R)R*t	verbositytexcludetteststskippedtmodnametmodtdetailRto((s0/usr/local/lib/python2.7/ctypes/test/__init__.pyt	get_tests=s,
"
-cCs	tGHdS(Ni(R	(((s0/usr/local/lib/python2.7/ctypes/test/__init__.pytusageVsc	s9ddl�ddl��jj���jj���jj�������fd�}tj|�}x4td�D]&}t	j
�}|j|�|�q|Wd}dg|}xHt|�D]:}t	j
�}|j|�|�t	j
�|||<q�Wt
d|�r#d|G|GHn|r5d|GHndS(s6Run testcase several times, tracking reference counts.i����Ncs;�j��_�j��_�j��_�j�dS(N(tcopyt_pointer_type_cachet_c_functype_cachet_win_functype_cachetcollect((tcfctctypestgctptctwfc(s0/usr/local/lib/python2.7/ctypes/test/__init__.pytcleanupdsis%s leaks:
	s%s: ok.(RLRKRFRERGRHRt	makeSuitetrangeRtgettotalrefcounttrunRtfilter(	trunnerR;ttestcaseROttesttitrctCOUNTt	refcounts((RJRKRLRMRNs0/usr/local/lib/python2.7/ctypes/test/__init__.pyttest_with_refcountsZs,


t
TestRunnercBseZd�ZRS(cCs�|j�}tj�}||�tj�}||}|j�|jj|j�|j}tr�tj�}|j	�|jjd||dkr�dp�d|t
|�t
|�dkr�dp�df�|jjddj|��n/|jjd||dkrdpd|f�|jj�|j�s�|jj
d�tt
|j|jf�\}	}
|	r�|jj
d	|	�n|
r�|	r�|jj
d�n|jj
d
|
�n|jjd�n|jjd�|S(
s&Run the given test case or test suite.s,Ran %d test%s in %.3fs (%s module%s skipped)itstsUnavailable resources: %ss, sRan %d test%s in %.3fssFAILED (sfailures=%ds	errors=%dt)tOK(t_makeResultttimetprintErrorststreamtwritelnt
separator2ttestsRunRtkeystsorttlenR#t
wasSuccessfultwritetmaptfailuresterrors(tselfRWR>Rt	startTimetstopTimet	timeTakenRSt	requestedtfailedterrored((s0/usr/local/lib/python2.7/ctypes/test/__init__.pyRS|s>


	
	# #
!(RRRS(((s0/usr/local/lib/python2.7/ctypes/test/__init__.pyR]{sc
Gsiy#tjtjdd�\}}Wntjk
r=t�SXd}t}g}x�|D]�\}}|dkr||d8}qW|dkr�|d7}qW|dkr�ytjWntk
r�tjdIJdSXt	}qW|dkr�t
j|jd	��qW|d
krW|j|jd	��qWqWWd}|r>|d}nx$|D]}	t
|	||||�qEWdS(
Nisrqvu:x:s-qs-vs-rs#-r flag requires Python debug buildi����s-ut,s-xs	test_*.pyi(tgetoptRtargvterrorRDtFalseRRtAttributeErrorR0RRtextendR.t	run_tests(
tpackagestoptstargsR;tsearch_leaksR<tflagtvalueR*R)((s0/usr/local/lib/python2.7/ctypes/test/__init__.pytmain�s8#



	

c
Cs�t||||�\}}td|�}g|D]}tj|�^q1}	tj|	�}
|j|
|�}|r�t�}x!|D]}t|||�q�Wnt|j	�S(NR;(
RCR]RRPt	TestSuiteRStBasicTestRunnerR\tboolRp(
R)R*R;R�R<R>t	testcasesRURBtsuitestsuiteRtt((s0/usr/local/lib/python2.7/ctypes/test/__init__.pyR�s"	
R�cBseZd�ZRS(cCstj�}||�|S(N(Rt
TestResult(RqRWR((s0/usr/local/lib/python2.7/ctypes/test/__init__.pyRS�s
(RRRS(((s0/usr/local/lib/python2.7/ctypes/test/__init__.pyR��s(((R RRRyRcRRKR5RRR4RRRRRR,RCRDR\tTextTestRunnerR]R�RR�(((s0/usr/local/lib/python2.7/ctypes/test/__init__.pyt<module>s <		
			!'	"