python (3.11.7)

(root)/
lib/
python3.11/
test/
__pycache__/
test_termios.cpython-311.pyc

e+ddlZddlZddlZddlZddlZddlmZedZeje	eddGddej
ZGdd	ej
Ze
d
krejdSdS)N)
import_moduletermiosopenptyzneed os.openpty()czeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdS)
TestFunctionsc^tj\}|_|tj||t
|jdd|_|tj	dd}|
|_dS)Nwbr)	buffering)moder
)osrfd
addCleanupcloseenterContextopenstreamtempfile
TemporaryFilefilenobad_fd)self	master_fdtmps   E/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_termios.pysetUpzTestFunctions.setUpsZ\\	47),,,''TWda(H(H(HII 6DA N N NOOjjllc|tj5}||dddn#1swxYwY||jjd|dS)Nr)assertRaisesrerrorassertEqual	exceptionargs)rerrnocallabler"cms     rassertRaisesTermiosErrorz&TestFunctions.assertRaisesTermiosErrors


w}
-
-	HdOO															*1-u55555s266ctt|j}||t|t
|dtdD]#}|||t$|\}}}}}}}	||	t|t
|	tj	t|	D]\}}
|tjzdkr<|tjks|tj
kr||
tT||
t|t
|
d|t|j|dS)Nr)r	tcgetattrr
assertIsInstancelistr lenrangeintNCCS	enumerateICANONVMINVTIMEbytesr)rattrsiiflagoflagcflaglflagispeedospeedccxs           rtest_tcgetattrzTestFunctions.test_tcgetattrs!!$'**eT***UQ'''q	1	1A!!%(C00009>6ueUFFBb$'''R',///bMM	,	,DAq'A--gl""a7=&8&8%%a----%%a///  Q++++**4;77?????rc|tjtj|j|ttjd|ttjddz|ttjt|ttjdSN)r&r#ENOTTYrr+rr
ValueError
OverflowError	TypeErrorobjectrs rtest_tcgetattr_errorsz#TestFunctions.test_tcgetattr_errors,s%%elG4Et{SSS*g&7<<<-):AtGDDD)W%6AAA)W%677777rct|j}t|jtj|t|jtj|t|jtj|t|jtj|dSN)rr+r
	tcsetattrTCSANOW	TCSADRAIN	TCSAFLUSHr)rr7s  rtest_tcsetattrzTestFunctions.test_tcsetattr3s!!$'**$'7?E:::$'7#4e<<<$'7#4e<<<$+w>>>>>rc
Nt|j}|ttj|jtjt||ttj|jtj|dd|ttj|jtj|dgztdD]}|dd}ddz||<|ttj|jtj|t||<|ttj|jtj||ttj|jtj|dd|dddgz|ttj|jtj|dd|ddgzgztt|dD]7}|dd}|ddd|d<ddz|d|<|ttj|jtj|t|d|<|ttj|jtj|d|d|<|ttj|jtj|d|d|<|ttj|jtj|9|ttj|jtjt|ttj|jtj|tjtj|jd||ttj|jddz||ttj|jt||tjtj|jtj||t"tjdtj||ttjddztj||ttjttj||ttj|jtjdS)	NrDrr)rErFrs)rr+r
rrJrPrQtupler/rIrKr.r&r#EINVALrGrrH)rr7r8attrs2s    rtest_tcsetattr_errorsz#TestFunctions.test_tcsetattr_errors:sG!!$'**)W%6RWX]R^R^___)W%6RWX[Y[X[R\]]])W%6RW[\Z]R]^^^q	^	^A111XF4F1ImW->Z`aaaF1Ii):DGW_V\]]]])W%6RWX[Y[X[R\`efh`ijmkmjm`n_oRoppp)W%6RWX[Y[X[R\`efh`imrls`s_tRtuuus59~~&&
	^
	^A111XFAAAF2JtGF2JqMmW->Z`aaa"HHF2JqMi):DGW_V\]]]F2JqMi):DGW_V\]]]#F2JqMi):DGW_V\]]]])W%6RXRZRZ[[[)W%6QQQ%%elG4EtwPRTYZZZ-):DGQWeTTT)W%65QQQ%%elG4Et{T[Tcejkkk*g&7W_eTTT-):AtGW_V[\\\)W%6'/SXYYY)W%6QQQQQrcX	t|jdng#tj$rU}|jdt
jkr4tj	dr|
dd}~wwxYwt|jddS)Nr*rfreebsdzQtermios.tcsendbreak() is not supported with pseudo-terminals (?) on this platform)rtcsendbreakr
rr"r#rGsysplatform
startswithskipTestr)rexcs  rtest_tcsendbreakzTestFunctions.test_tcsendbreak]s	++++}			x{el**s|/F/Fy/Q/Q*

KLLL		
	DK+++++s #BABBc|ttj|jddz|t
tj|jd|t
tj|jt
|tj	tj|j
d|ttjdd|ttjddzd|t
tjt
d|t
tj|jdS)NrErFgrrD)rrIrr]r
rJrKr&r#rGrrHrLs rtest_tcsendbreak_errorsz%TestFunctions.test_tcsendbreak_errorsgs-)<dgq$wOOO)W%8$'3GGG)W%8$'688LLL%%elG4GVWXXX*g&92qAAA-)<agqIII)W%8&((AFFF)W%8$'BBBBBrct|jt|jdSrO)rtcdrainr
rrLs rtest_tcdrainzTestFunctions.test_tcdrainqs0   $$$$$rc|tjtj|j|ttjd|ttjddz|ttjt|ttjdSrC)r&r#rGrrgrrrHrIrJrKrLs rtest_tcdrain_errorsz!TestFunctions.test_tcdrain_errorsus%%elGOT[QQQ*gor:::-!T'BBB)W_fhh???)W_55555rct|jtjt|jtjt|jtjdSrO)rtcflushr
TCIFLUSHTCOFLUSH	TCIOFLUSHrLs rtest_tcflushzTestFunctions.test_tcflush|sS!1222!1222!233333rcF|tjtj|jd|ttj|jddz|ttj|jt|tj
tj|jtj|ttjdtj|ttjddztj|ttjttj|ttj|jdSrC)r&r#rXrrlr
rrIrJrKrGrrmrHrLs rtest_tcflush_errorsz!TestFunctions.test_tcflush_errorss%%elGOTWbQQQ-$'1d7KKK)W_dgvxxHHH%%elGOT[RYRbccc*gor7;KLLL-!T'7CSTTT)W_fhh@PQQQ)W_dg>>>>>rcVt|jtjt|jtjt|jtjt|jtjdSrO)rtcflowr
TCOOFFTCOONTCIOFFTCIONrLs rtest_tcflowzTestFunctions.test_tcflowshtw///tw
...tw///tw
.....rcF|tjtj|jd|ttj|jddz|ttj|jt|tj
tj|jtj|ttjdtj|ttjddztj|ttjttj|ttj|jdSrC)r&r#rXrrtr
rrIrJrKrGrrvrHrLs rtest_tcflow_errorsz TestFunctions.test_tcflow_errorss%%elGNDGRPPP-!T'JJJ)W^TWfhhGGG%%elGNDKQXQ^___*gnb'-HHH-D'-PPP)W^VXXw}MMM)W^TW=====rct|j}||t|t
|d||dt||dt|t|j|dS)NrErr*)	rtcgetwinsizer
r,rWr r.r0rrsizes  rtest_tcgetwinsizezTestFunctions.test_tcgetwinsizes##DG,,dE***TA&&&d1gs+++d1gs+++--dk::DAAAAArc|tjtj|j|ttjd|ttjddz|ttjt|ttjdSrC)r&r#rGrr}rrrHrIrJrKrLs rtest_tcgetwinsize_errorsz&TestFunctions.test_tcgetwinsize_errorss%%elG4H$+VVV*g&:B???-)=q$wGGG)W%9688DDD)W%9:::::rct|j}t|j|t|jt	|t|j|dSrO)rr}r
tcsetwinsizer-rr~s  rtest_tcsetwinsizezTestFunctions.test_tcsetwinsizesk##DG,,TWd+++TWd4jj111T[$/////rc
2t|j}|ttj|j|dd|ttj|j|dz|ttj|jt
|ttj|j|dddzf|ttj|j|dt|df|ttj|j|dt
f|ttj|jddz|df|ttj|jt|d|df|ttj|jt
|df|	tjtj|j||ttjd||ttjddz||ttjt
||ttj|jdS)NrD)rrrErFr*)rr}r
rrJrrKrIfloatr&r#rGrrHr~s  rtest_tcsetwinsize_errorsz&TestFunctions.test_tcsetwinsize_errorssJ##DG,,)W%947D"INNN)W%947D4KPPP)W%947FHHMMM-)=twaRSUYRYHZ[[[)W%947T!WeTXYZT[nnD]^^^)W%947T!WfhhDWXXX-)=twDRVWXRYHZ[[[)W%947U4PQ7^^UYZ[U\D]^^^)W%947VXXtTUwDWXXX%%elG4H$+W[\\\*g&:BEEE-)=q$wMMM)W%9688TJJJ)W%947CCCCCrN)__name__
__module____qualname__rr&rArMrTrZrcrerhrjrprrryr{rrrrrrrrs4###666
@@@$888???!R!R!RF,,,CCC%%%666444
???///>>>BBB;;;000DDDDDrrceZdZdZdZdS)
TestModulec|tjt|tjt|tjt|tjt|tjt|tjt|tj	t|tj
t|tjt|tjt|tj
t|tjt|tjt|tjt|tjt|tjtj|tjtjdSrO)r,rB0r0B38400rQrRrSrmrnrorurvrwrxr5r4r1
assertLessrLs rtest_constantszTestModule.test_constantssgj#...gnc222gos333g/555g/555g.444g.444g/555gnc222gmS111gnc222gmS111gmS111glC000glC000
w|444gl33333rc|ttjt|ttjtdSrO)
assertTrue
issubclassrr	ExceptionassertFalseOSErrorrLs rtest_exceptionzTestModule.test_exceptionsF
7=)<<===GM7;;<<<<<rN)rrrrrrrrrrs2444&=====rr__main__)r#rr^runittesttest.support.import_helperrr
skipUnlesshasattrTestCaserrrmainrrr<module>rs				



444444
-	
"
"WWR++-@AAsDsDsDsDsDH%sDsDBAsDl====="===2zHMOOOOOr