Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 18.118.212.0
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_fcntl.pyc
�
?��cc@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((s6/usr/local/python-2.7/lib/python2.7/test/test_fcntl.pytget_lockdatas2	

	*	,tBadFilecBseZd�Zd�ZRS(cCs
||_dS(N(tfn(tselfR*((s6/usr/local/python-2.7/lib/python2.7/test/test_fcntl.pyt__init__7scCs|jS(N(R*(R+((s6/usr/local/python-2.7/lib/python2.7/test/test_fcntl.pytfileno9s(t__name__t
__module__R,R-(((s6/usr/local/python-2.7/lib/python2.7/test/test_fcntl.pyR)6s	t	TestFcntlcBsMeZd�Zd�Zd�Zd�Zd�Zed��Zd�Z	RS(cCs
d|_dS(N(R"tf(R+((s6/usr/local/python-2.7/lib/python2.7/test/test_fcntl.pytsetUp>scCs4|jr&|jjr&|jj�ntt�dS(N(R1tclosedtcloseRR(R+((s6/usr/local/python-2.7/lib/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((s6/usr/local/python-2.7/lib/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;((s6/usr/local/python-2.7/lib/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+((s6/usr/local/python-2.7/lib/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((s6/usr/local/python-2.7/lib/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((s6/usr/local/python-2.7/lib/python2.7/test/test_fcntl.pyttest_fcntl_64_bitqs	

-
(
R.R/R2R5R<R=RBRRFRR(((s6/usr/local/python-2.7/lib/python2.7/test/test_fcntl.pyR0<s					

cCstt�dS(N(RR0(((s6/usr/local/python-2.7/lib/python2.7/test/test_fcntl.pyt	test_main�st__main__((t__doc__RRRtunittestttest.test_supportRRRRRRRR(R'R)tTestCaseR0RSR.(((s6/usr/local/python-2.7/lib/python2.7/test/test_fcntl.pyt<module>s.	 	H	
© 2025 GrazzMean