ó
    Ö›‘hë  ã                   ó   •  " S  S5      r g)c                   óJ   • \ rS rSrSrS rS rS rS r\r	S r
SS	 jrS
 rSrg)ÚMonkeyPatcheré   zb
Cover up attributes with new objects. Neat for monkey-patching things for
unit-testing purposes.
c                 óP   • / U l         / U l        U H  nU R                  " U6   M     g ©N)Ú_patchesToApplyÚ
_originalsÚaddPatch)ÚselfÚpatchesÚpatchs      ÚYC:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\twisted/python/monkey.pyÚ__init__ÚMonkeyPatcher.__init__   s)   € à!ˆÔð ˆŒÛˆEØ�MŠM˜5Ó!ò ó    c                 ó>   • U R                   R                  XU45        g)zÆ
Add a patch so that the attribute C{name} on C{obj} will be assigned to
C{value} when C{patch} is called or during C{runWithPatches}.

You can restore the original values with a call to restore().
N)r   Úappend©r
   ÚobjÚnameÚvalues       r   r	   ÚMonkeyPatcher.addPatch   s   € ð 	×Ñ×#Ñ# S°Ð$6Õ7r   c                 óD   • U R                    H  u  p4nX44X4:X  d  M    g   g)zK
Has the C{name} attribute of C{obj} already been patched by this
patcher?
TF)r   )r
   r   r   ÚoÚnÚvs         r   Ú_alreadyPatchedÚMonkeyPatcher._alreadyPatched   s*   € ð
 —”‰GˆA�!Øˆv˜#˜Õ$Ùñ 'ð r   c           	      óÀ   • U R                    HN  u  pnU R                  X5      (       d&  U R                  R                  X[	        X5      45        [        XU5        MP     g)zn
Apply all of the patches that have been specified with L{addPatch}.
Reverse this operation using L{restore}.
N)r   r   r   r   ÚgetattrÚsetattrr   s       r   r   ÚMonkeyPatcher.patch)   sP   € ð
 !%× 4Ô 4ÑˆC�uØ×'Ñ'¨×2Ñ2Ø—‘×&Ñ&¨´7¸3Ó3EÐ'FÔGÜ�C˜uÖ%ò !5r   c                 ó    • U R                   (       a=  U R                   R                  5       u  pn[        XU5        U R                   (       a  M<  gg)z5
Restore all original values to any patched objects.
N)r   Úpopr    r   s       r   ÚrestoreÚMonkeyPatcher.restore5   s7   € ð �o�oØ#Ÿ™×2Ñ2Ó4ÑˆC�uÜ�C˜uÔ%ð �o�o‹or   Nc                 ó$   • U R                  5         g r   )r$   )r
   ÚexcTypeÚexcValueÚexcTracebacks       r   Ú__exit__ÚMonkeyPatcher.__exit__=   s   € Ø�‰�r   c                 ó~   • U R                  5          U" U0 UD6U R                  5         $ ! U R                  5         f = f)z{
Apply each patch already specified. Then run the function f with the
given args and kwargs. Restore everything when done.
)r   r$   )r
   ÚfÚargsÚkws       r   ÚrunWithPatchesÚMonkeyPatcher.runWithPatches@   s0   € ð
 	�
‰
Œð	Ù�d�>˜b‘>à�L‰L�NøˆD�L‰L�Nús   ’* ª<)r   r   )NNN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r	   r   r   Ú	__enter__r$   r*   r0   Ú__static_attributes__© r   r   r   r      s1   † ñò
"ò8òò&ð €Iò&ôõ	r   r   N)r   r9   r   r   Ú<module>r:      s   ð÷Bò Br   