/opt/cloudlinux/venv/lib/python3.11/site-packages/testfixtures/__pycache__
NameSizeModeActions
comparison.cpython-311.pyc587880644editdlrm
compat.cpython-311.pyc5870644editdlrm
components.cpython-311.pyc27840644editdlrm
datetime.cpython-311.pyc339940644editdlrm
django.cpython-311.pyc40280644editdlrm
logcapture.cpython-311.pyc160040644editdlrm
mock.cpython-311.pyc19360644editdlrm
outputcapture.cpython-311.pyc76200644editdlrm
popen.cpython-311.pyc136650644editdlrm
replace.cpython-311.pyc168820644editdlrm
resolve.cpython-311.pyc35670644editdlrm
rmtree.cpython-311.pyc26910644editdlrm
shouldraise.cpython-311.pyc53570644editdlrm
shouldwarn.cpython-311.pyc44040644editdlrm
sybil.cpython-311.pyc43490644editdlrm
tempdirectory.cpython-311.pyc183370644editdlrm
twisted.cpython-311.pyc73700644editdlrm
utils.cpython-311.pyc52070644editdlrm
__init__.cpython-311.pyc24850644editdlrm
Edit: /opt/cloudlinux/venv/lib/python3.11/site-packages/testfixtures/__pycache__/popen.cpython-311.pyc (13665B)
§ ßç’SË ßSãóv—ddlZddlmZmZmZddlmZddlmZm Z ddl m Z m Z ddl mZddlmZddlmZmZmZmZmZmZmZd d lmZmZmZeeefZ eeeefZ!d e!d efd „Z"Gd„de#¦«Z$d efd„Z%Gd„de#¦«Z&Gd„de#¦«Z'dZ(ee(e'j)e'j*g¦«dS)éN)ÚwrapsÚpartialÚreduce)Ú TextIOWrapper)ÚchainÚ zip_longest)ÚSTDOUTÚPIPE)Ú TemporaryFile)Úextend_docstring)ÚUnionÚCallableÚListÚOptionalÚSequenceÚTupleÚDicté)ÚMockÚcallÚ_CallÚcommandÚreturncón—t|t¦«sd d„|D¦«¦«}|S)Nú c3ó>K—|]}tj|¦«V—ŒdS©N)ÚpipesÚquote)Ú.0Úparts úd/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/testfixtures/popen.pyú zshell_join..s,èè€ÐAÐA°�5œ; tÑ,Ô,ÐAÐAÐAÐAÐAÐAó)Ú isinstanceÚstrÚjoin)rs r"Ú shell_joinr(s:€Ý �g�sÑ #Ô #ðBØ—(’(ÐAÐA¸ÐAÑAÔAÑAÔAˆØ €Nr$c ó:—eZdZdZ d dededed ed ef d „Zd S)ÚPopenBehaviourzp An object representing the behaviour of a :class:`MockPopen` when simulating a particular command. r$réÒéÚstdoutÚstderrÚ returncodeÚpidÚ poll_countcóL—||_||_||_||_||_dSr)r-r.r/r0r1)Úselfr-r.r/r0r1s r"Ú__init__zPopenBehaviour.__init__s+€ðˆŒ ؈Œ Ø$ˆŒØˆŒØ$ˆŒˆˆr$N)r$r$rr+r,)Ú__name__Ú __module__Ú __qualname__Ú__doc__ÚbytesÚintr4©r$r"r*r*sx€€€€€ððð ØØØØð %ð %àð %ðð %ðð %ð ð %ð ð %ð %ð %ð %ð %ð %r$r*có<‡—t‰¦«ˆfd„¦«}|S)NcóJ•—|j‰jfg|¢Ri|¤Ž‰|g|¢Ri|¤ŽSr)Ú_recordr5)r3ÚargsÚkwÚfuncs €r"Úrecorderzrecord..recorder,sJø€àˆŒ �d”mÐ%Ð3¨Ð3Ð3Ð3°Ð3Ð3Ð3؈t�DÐ&˜4Ð&Ð&Ð& 2Ð&Ð&Ð&r$)r)rArBs` r"ÚrecordrC+s3ø€Ý ˆ4�[„[ð'ð'ð'ð'ñ„[ð'ð €Or$c ó6—eZdZUdZdZeed<dZeed<dZ eed< dd „Z d „Z d „Z d „Z eddedefd„¦«Zeddededeeeffd„¦«Zedeefd„¦«Zededdfd„¦«Zedd„¦«Zedd„¦«ZdS)ÚMockPopenInstancez; A mock process as returned by :class:`MockPopen`. NÚstdinr-r.rFTr;cóh—t¦«|_|jj|_||_g|_|j|_t|¦«}|j  ||j ¦«}|€td|z¦«‚t|¦«r |||¬¦«}||_ |j}|j}|t krit#jt'| d¦«| d¦«¦«¦«}d d„|D¦«¦«}d}|j|_d||fd||ffD]†\}}}d}|t.urdt1¦«}| |¦«| ¦«| d¦«|s|s|rt9|||¬ ¦«}t;|||¦«Œ‡|t.krIt¦«|_d D]3} t?|j d | f¦«}!|!tC|j| ¦«_"Œ4|j#|_#d|_$||_%dS) Nz Nothing specified for command %r)rrFTr$c3óK—|]}|¯|V—Œ dSrr;)r Úls r"r#z-MockPopenInstance.__init__..is'èè€Ð#BÐ#B¨!ÀÐ#B AÐ#BÐ#BÐ#BÐ#BÐ#BÐ#Br$r-r.r)ÚencodingÚerrors)ÚwriteÚcloserF)&rÚmockÚPopen_instanceÚclass_instance_mockÚ root_callÚcallsÚ all_callsr(ÚcommandsÚgetÚdefault_behaviourÚKeyErrorÚcallableÚ behaviourr-r.r rÚ from_iterablerÚ splitlinesr'r1r r rLÚflushÚseekrÚsetattrrFrr>ÚgetattrÚ side_effectr0r/r?)"r3Ú mock_classrQr?ÚbufsizeÚ executablerFr-r.Ú preexec_fnÚ close_fdsÚshellÚcwdÚenvÚuniversal_newlinesÚ startupinfoÚ creationflagsÚrestore_signalsÚstart_new_sessionÚpass_fdsrJrKÚtextÚcmdrYÚ stdout_valueÚ stderr_valueÚ line_iteratorÚnameÚoptionÚ mock_valueÚvalueÚmethodÚ record_writess" r"r4zMockPopenInstance.__init__DsS€õ™&œ&ˆŒ Ø)3¬Ô)GˆÔ ð )ˆŒð"$ˆŒ Ø%/Ô%9ˆŒå˜ÑÔˆàÔ'×+Ò+¨C°Ô1MÑNÔNˆ Ø Ð ÝÐ=ÀÑCÑDÔDÐ Då �IÑ Ô ð <Ø!˜ ¨#°UÐ;Ñ;Ô;ˆIà)2ˆŒà Ô'ˆ Ø Ô'ˆ à •VÒ Ð Ý!Ô/µ Ø×'Ò'¨Ñ-Ô-Ø×'Ò'¨Ñ-Ô-ñ1ô1ñôˆMðŸ8š8Ð#BÐ#B¨}Ð#BÑ#BÔ#BÑBÔBˆL؈Là(Ô3ˆŒà �v˜|Ð ,Ø �v˜|Ð ,ð) ð 'ð 'Ñ $ˆD�&˜*ðˆEØ�ˆ~ˆ~Ý%™œ�Ø— ’ ˜JÑ'Ô'Ð'Ø— ’ ‘ ” � Ø— ’ ˜1‘ ” � Ø%ðS¨ðS°ðSÝ)¨%¸(È6ÐRÑRÔR�EÝ �D˜$ Ñ &Ô &Ð &Ð &à •DŠ=ˆ=Ý™œˆDŒJØ*ð Hð H�Ý '¨¬ °wÀÐ6GÑ HÔ H� Ø:G•˜œ  FÑ+Ô+Ô7Ð7à!œ ˆŒà)-ˆŒØ!ˆŒ ˆ ˆ r$c ó—|j|jfD]}tt||¦«|i|¤ŽŒt|jf|j|jffD]4\}}| tt||¦«|i|¤Ž¦«Œ5dSr) rPrNrr_rrRrQrSÚappend)r3Únamesr?r@rNÚ base_callÚstores r"r>zMockPopenInstance._record†s¬€ØÔ,¨d¬iÐ7ð 6ð 6ˆDØ (�F•7˜E 4Ñ (Ô (¨$Ð 5°"Ð 5Ð 5Ð 5Ð 5å �4”:Ð Ø Œ^˜Tœ^Ð ,ð! ð Ið IÑ ˆI�uð �LŠLÐ:�¥¨° Ñ:Ô:¸DÐGÀBÐGÐGÑ HÔ HÐ HÐ Hð  Ið Ir$có—|Srr;©r3s r"Ú __enter__zMockPopenInstance.__enter__�s€Øˆ r$có|—| ¦«|j|jfD]}|r| ¦«ŒdSr)Úwaitr-r.rM)r3Úexc_typeÚexc_valÚexc_tbÚstreams r"Ú__exit__zMockPopenInstance.__exit__’sG€Ø � Š ‰ Œ ˆ Ø”k 4¤;Ð.ð ð ˆFØð Ø— ’ ‘”�øð ð r$Útimeoutrcó2—|jj|_|jS)z/Simulate calls to :meth:`subprocess.Popen.wait`)rYr/)r3r‰s r"rƒzMockPopenInstance.wait˜s€ðœ.Ô3ˆŒØŒÐr$Úinputcó¤—|jj|_|jo|j ¦«|jo|j ¦«fS)z6Simulate calls to :meth:`subprocess.Popen.communicate`)rYr/r-Úreadr.)r3r‹r‰s r"Ú communicatezMockPopenInstance.communicatežsJ€ðœ.Ô3ˆŒØ” Ð2 ¤ × 0Ò 0Ñ 2Ô 2Ø” Ð2 ¤ × 0Ò 0Ñ 2Ô 2ð4ð 4r$cór—|jr|j€|xjdzc_dS|jj|_|jS)z/Simulate calls to :meth:`subprocess.Popen.poll`Nr)r1r/rYr€s r"ÚpollzMockPopenInstance.poll¥s@€ðŒoð  $¤/Ð"9Ø ˆOŒO˜qÑ ˆOŒOØ�4ð œ.Ô3ˆŒØŒÐr$Úsignalcó—dS)z6Simulate calls to :meth:`subprocess.Popen.send_signal`Nr;)r3r‘s r"Ú send_signalzMockPopenInstance.send_signal²ó €ð ˆr$có—dS)z4Simulate calls to :meth:`subprocess.Popen.terminate`Nr;r€s r"Ú terminatezMockPopenInstance.terminate·r”r$có—dS)z/Simulate calls to :meth:`subprocess.Popen.kill`Nr;r€s r"ÚkillzMockPopenInstance.kill¼r”r$)rNNNNNFFNNFNrTFr;NNNr)NN)rN)r5r6r7r8rFrÚ__annotations__r-r r.r4r>r�rˆrCÚfloatr:rƒÚAnyStrrrŽrr�r“r–r˜r;r$r"rErE3sÈ€€€€€€ððð€Eˆ4ÐÐÑð!€FˆMÐ Ð Ñ ð!€FˆMÐ Ð Ñ ð.2Ø15ØDHØ.3ØDHØ35Ø26ð@"ð@"ð@"ð@"ðDIðIðIððððððð  ðð˜Eð¨Sðððñ „Vðð  ð4ð4 ð4¸ð4È%ÐPVÐX^ÐP^ÔJ_ð4ð4ð4ñ „Vð4ð  ð �h˜s”mð ð ð ñ „Vð ð ð  #ð ¨$ð ð ð ñ „Vð ð ð ð ð ñ „Vð ð ð ð ð ñ „Vð ð ð r$rEcó‚—eZdZUdZdZeed<d„Zd„Z dd e d e d e d e de de de ee ffd„Z dd„Zd„ZdS)Ú MockPopena A specialised mock for testing use of :class:`subprocess.Popen`. An instance of this class can be used in place of the :class:`subprocess.Popen` and is often inserted where it's needed using :func:`unittest.mock.patch` or a :class:`~testfixtures.Replacer`. NrVcóH—i|_t¦«|_g|_dSr)rTrrNrSr€s r"r4zMockPopen.__init__Ìs!€Ø35ˆŒ Ý™&œ&ˆŒ ð&(ˆŒˆˆr$có0—|€t|||||¦«S|Sr)r*©r3r-r.r/r0r1rYs r"Ú_resolve_behaviourzMockPopen._resolve_behaviourÓs-€à Ð Ý!ؘ  ¨C°ñôð ðÐ r$r$rr+r,rr-r.r/r0r1rYcód—| ||||||¦«|jt|¦«<dS)z½ Set the behaviour of this mock when it is used to simulate the specified command. :param command: A :class:`str` representing the command to be simulated. N)r¡rTr()r3rr-r.r/r0r1rYs r"Ú set_commandzMockPopen.set_commandÜs;€ð .2×-DÒ-DØ �F˜J¨¨Z¸ñ. ô. ˆŒ •j Ñ)Ô)Ñ*Ð*Ð*r$cóD—| ||||||¦«|_dS)z´ Set the behaviour of this mock when it is used to simulate commands that have no explicit behavior specified using :meth:`~MockPopen.set_command`. N)r¡rVr s r"Ú set_defaultzMockPopen.set_defaultðs/€ð"&×!8Ò!8Ø �F˜J¨¨Z¸ñ" ô" ˆÔÐÐr$cóž—|jj|i|¤Žtj|i|¤Ž}|j |¦«t ||g|¢Ri|¤ŽSr)rNÚPopenrrSr{rE)r3r?r@rQs r"Ú__call__zMockPopen.__call__ûse€ØˆŒ Œ˜Ð$ Ð$Ð$Ð$Ý”J Ð+¨Ð+Ð+ˆ Ø Œ×Ò˜iÑ(Ô(Ð(Ý   yÐ>°4Ð>Ð>Ð>¸2Ð>Ð>Ð>r$)r$r$rr+r,N)r5r6r7r8rVr*r™r4r¡r&r9r:r rr£r¥r¨r;r$r"r�r�Âs÷€€€€€€ððð)-Ð�~Ð,Ð,Ñ,ð(ð(ð(ðððð ØØØØØ9=ð ð àð ðð ðð  ð ð  ð ð  ðð ð˜^¨XÐ5Ô6ð ð ð ð ð(>?Ø6:ð  ð  ð  ð  ð?ð?ð?ð?ð?r$r�aü :param stdout: :class:`bytes` representing the simulated content written by the process to the stdout pipe. :param stderr: :class:`bytes` representing the simulated content written by the process to the stderr pipe. :param returncode: An integer representing the return code of the simulated process. :param pid: An integer representing the process identifier of the simulated process. This is useful if you have code the prints out the pids of running processes. :param poll_count: Specifies the number of times :meth:`~MockPopenInstance.poll` can be called before :attr:`~MockPopenInstance.returncode` is set and returned by :meth:`~MockPopenInstance.poll`. If supplied, ``behaviour`` must be either a :class:`PopenBehaviour` instance or a callable that takes the ``command`` string representing the command to be simulated and the ``stdin`` supplied when instantiating the :class:`subprocess.Popen` with that command and should return a :class:`PopenBehaviour` instance. )+rÚ functoolsrrrÚiorÚ itertoolsrrÚ subprocessr r Útempfiler Útestfixtures.utilsr Útypingr rrrrrrrNrrrÚCallr&r9r›ÚCommandr(Úobjectr*rCrEr�Úset_command_paramsr£r¥r;r$r"úr´s ðØ € € € Ø,Ð,Ð,Ð,Ð,Ð,Ð,Ð,Ð,Ð,ØÐÐÐÐÐØ(Ð(Ð(Ð(Ð(Ð(Ð(Ð(Ø#Ð#Ð#Ð#Ð#Ð#Ð#Ð#Ø"Ð"Ð"Ð"Ð"Ð"Ø/Ð/Ð/Ð/Ð/Ð/ØIÐIÐIÐIÐIÐIÐIÐIÐIÐIÐIÐIÐIÐIÐIÐIÐIÐIØ+Ð+Ð+Ð+Ð+Ð+Ð+Ð+Ð+Ð+ð ˆs�EˆzÔ €Ø ��X˜c”]Ð"Ô #€ð˜ð Cððððð %ð%ð%ð%ð%�Vñ%ô%ð%ð*�HðððððL ðL ðL ðL ðL ˜ñL ôL ðL ð^=?ð=?ð=?ð=?ð=?�ñ=?ô=?ð=?ð@Ðð6ÐÐ#ØÔ'¨Ô)>Ð?ñAôAðAðAðAr$