ó
    ×›‘h1>  ã                  óü   • S r SSKJr  SSKrSSKrSSKJrJr  SSKJ	r	  SSK
Jr  SSKJr  SSKJr  SS	KJr  S
rSr\R(                  " 5       (       a  \" S5      c  \" S5      c  SrSr " S S\5      r " S S\5      rg)z'
Tests for L{twisted.python.lockfile}.
é    )ÚannotationsN)ÚskipIfÚ
skipUnless)ÚNoReturn)Úlockfile)ÚrequireModule)Úplatform)ÚTestCaseFÚ zwin32api.OpenProcessÚ
pywintypesTzZOn windows, lockfile.kill is not implemented in the absence of win32api and/or pywintypes.c                  óú   • \ rS rSrSrSS jr\" \R                  " 5       S5      SS j5       r	SS jr
\" \R                  " 5       S5      SS j5       r\" \\5      SS	 j5       r\" \\5      SS
 j5       rSS jrSrg)Ú	UtilTestsé#   zE
Tests for the helper functions used to implement L{FilesystemLock}.
c                óò   • U R                  5       n[        R                  " SU5        U R                  [        [        R                  SU5      nU R                  UR                  [        R                  5        g)zˆ
L{lockfile.symlink} raises L{OSError} with C{errno} set to L{EEXIST}
when an attempt is made to create a symlink which already exists.
ÚfooN)Úmktempr   ÚsymlinkÚassertRaisesÚOSErrorÚassertEqualÚerrnoÚEEXIST©ÚselfÚnameÚexcs      Ú^C:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\twisted/test/test_lockfile.pyÚtest_symlinkEEXISTÚUtilTests.test_symlinkEEXIST(   sS   € ð
 �{‰{‹}ˆÜ×Ò˜ Ô%Ø×Ñ¤¬×)9Ñ)9¸5À$ÓGˆØ×Ñ˜Ÿ™¤E§L¡LÕ1ó    úBspecial rename EIO handling only necessary and correct on Windows.c                óü   • U R                  5       nSS jnU R                  [        SU5        U R                  [        [        R
                  US5      nU R                  UR                  [        R                  5        g)a  
L{lockfile.symlink} raises L{OSError} with C{errno} set to L{EIO} when
the underlying L{rename} call fails with L{EIO}.

Renaming a file on Windows may fail if the target of the rename is in
the process of being deleted (directory deletion appears not to be
atomic).
c                ó6   • [        [        R                  S 5      e©N©r   r   ÚEIO©ÚsrcÚdsts     r   Ú
fakeRenameÚ4UtilTests.test_symlinkEIOWindows.<locals>.fakeRenameA   s   € Üœ%Ÿ)™) TÓ*Ð*r    Úrenamer   N©r(   Ústrr)   r.   Úreturnr   )	r   Úpatchr   r   ÚIOErrorr   r   r   r&   )r   r   r*   r   s       r   Útest_symlinkEIOWindowsÚ UtilTests.test_symlinkEIOWindows2   sZ   € ð �{‰{‹}ˆô	+ð 	�
‰
”8˜X zÔ2Ø×Ñ¤¬×)9Ñ)9¸4ÀÓGˆØ×Ñ˜Ÿ™¤E§I¡IÕ.r    c                óÂ   • U R                  5       nU R                  [        [        R                  U5      nU R                  UR                  [        R                  5        g)z‡
L{lockfile.readlink} raises L{OSError} with C{errno} set to L{ENOENT}
when an attempt is made to read a symlink which does not exist.
N)r   r   r   r   Úreadlinkr   r   ÚENOENTr   s      r   Útest_readlinkENOENTÚUtilTests.test_readlinkENOENTH   sA   € ð
 �{‰{‹}ˆØ×Ñ¤¬×):Ñ):¸DÓAˆØ×Ñ˜Ÿ™¤E§L¡LÕ1r    úGspecial readlink EACCES handling only necessary and correct on Windows.c                óú   • U R                  5       nSS jnU R                  [        SU5        U R                  [        [        R
                  U5      nU R                  UR                  [        R                  5        g)a,  
L{lockfile.readlink} raises L{OSError} with C{errno} set to L{EACCES}
on Windows when the underlying file open attempt fails with C{EACCES}.

Opening a file on Windows may fail if the path is inside a directory
which is in the process of being deleted (directory deletion appears
not to be atomic).
c                ó6   • [        [        R                  S 5      er$   ©r   r   ÚEACCES)ÚpathÚmodes     r   ÚfakeOpenÚ6UtilTests.test_readlinkEACCESWindows.<locals>.fakeOpen`   ó   € Üœ%Ÿ,™,¨Ó-Ð-r    Ú_openN)r>   r.   r?   r.   r/   r   )	r   r0   r   r   r1   r5   r   r   r=   )r   r   r@   r   s       r   Útest_readlinkEACCESWindowsÚ$UtilTests.test_readlinkEACCESWindowsQ   sX   € ð �{‰{‹}ˆô	.ð 	�
‰
”8˜W hÔ/Ø×Ñ¤¬×):Ñ):¸DÓAˆØ×Ñ˜Ÿ™¤E§L¡LÕ1r    c                óX   • [         R                  " [        R                  " 5       S5        g)ze
L{lockfile.kill} returns without error if passed the PID of a
process which exists and signal C{0}.
r   N)r   ÚkillÚosÚgetpid©r   s    r   Ú	test_killÚUtilTests.test_killg   s   € ô 	�Š”b—i’i“k 1Õ%r    c                ó¤   • U R                  [        [        R                  SS5      nU R	                  UR
                  [
        R                  5        g)zu
L{lockfile.kill} raises L{OSError} with errno of L{ESRCH} if
passed a PID which does not correspond to any process.
iÿÿÿr   N)r   r   r   rG   r   r   ÚESRCH)r   r   s     r   Útest_killESRCHÚUtilTests.test_killESRCHo   s6   € ð ×Ñ¤¬¯©¸	À1ÓEˆØ×Ñ˜Ÿ™¤E§K¡KÕ0r    c                óØ   • U R                  [        SS5        [        R                  " U R                  5       5      nUR	                  5         U R                  UR	                  5       5        g)z•
Verify that when L{lockfile.kill} does end up as None (e.g. on Windows
without pywin32), it doesn't end up being called and raising a
L{TypeError}.
rG   N)r0   r   ÚFilesystemLockr   ÚlockÚassertFalse)r   Úfls     r   Útest_noKillCallÚUtilTests.test_noKillCally   sG   € ð 	�
‰
”8˜V TÔ*Ü×$Ò$ T§[¡[£]Ó3ˆØ
�‰Œ	Ø×Ñ˜Ÿ™›Õ#r    © N©r/   ÚNone)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r	   Ú	isWindowsr2   r7   rD   r   ÚskipKillÚskipKillReasonrK   rO   rV   Ú__static_attributes__rX   r    r   r   r   #   sœ   † ñô2ñ Ø×ÒÓØOóó/ó	ð/ô$2ñ Ø×ÒÓØTóó2ó	ð2ñ$ ˆH�nÓ%ó&ó &ð&ñ ˆH�nÓ%ó1ó &ð1÷	$r    r   c                  ó¬  • \ rS rSrSS jrSS jr\" \R                  " 5       S5      SS j5       r	SS jr
SS jrSS jrSS	 jrSS
 jr\" \R                  " 5       S5      SS j5       r\" \R                  " 5       S5      SS j5       r      SS jrSS jr\" \R                  " 5       S5      SS j5       rSS jrSS jrSS jrSS jrSS jrSrg)ÚLockingTestsé…   c                ó  ^• SU4S jjnU R                  [        SU5        U R                  5       n[        R                  " U5      nU R	                  [
        UR                  5      nU R                  UR                  T5        g )Nc                ó   >• [        TS 5      er$   )r   )ÚsourceÚdestr   s     €r   ÚfakeSymlinkÚ3LockingTests._symlinkErrorTest.<locals>.fakeSymlink‡   s   ø€ Ü˜% Ó&Ð&r    r   )ri   r.   rj   r.   r/   r   )	r0   r   r   rR   r   r   rS   r   r   )r   r   rk   ÚlockfrS   r   s    `    r   Ú_symlinkErrorTestÚLockingTests._symlinkErrorTest†   s_   ø€ ÷	'ð 	�
‰
”8˜Y¨Ô4à—‘“ˆÜ×&Ò& uÓ-ˆØ×Ñ¤¨¯©Ó3ˆØ×Ñ˜Ÿ™ EÕ*r    c                óB   • U R                  [        R                  5        g)zn
An exception raised by C{symlink} other than C{EEXIST} is passed up to
the caller of L{FilesystemLock.lock}.
N)rn   r   ÚENOSYSrJ   s    r   Útest_symlinkErrorÚLockingTests.test_symlinkError‘   s   € ð
 	×ÑœuŸ|™|Õ,r    z9POSIX-specific error propagation not expected on Windows.c                ó€   • U R                  [        R                  5        U R                  [        R                  5        g)zø
An L{OSError} raised by C{symlink} on a POSIX platform with an errno of
C{EACCES} or C{EIO} is passed to the caller of L{FilesystemLock.lock}.

On POSIX, unlike on Windows, these are unexpected errors which cannot
be handled by L{FilesystemLock}.
N)rn   r   r=   r&   rJ   s    r   Útest_symlinkErrorPOSIXÚ#LockingTests.test_symlinkErrorPOSIX˜   s(   € ð 	×ÑœuŸ|™|Ô,Ø×ÑœuŸy™yÕ)r    c                óú   • U R                  5       n[        R                  " U5      nU R                  UR	                  5       5        U R                  UR
                  5        U R                  UR                  5        g)zs
If the lock has never been held, it can be acquired and the C{clean}
and C{locked} attributes are set to C{True}.
N)r   r   rR   Ú
assertTruerS   ÚcleanÚlocked©r   rm   rS   s      r   Útest_cleanlyAcquireÚ LockingTests.test_cleanlyAcquire§   sQ   € ð
 —‘“ˆÜ×&Ò& uÓ-ˆØ�‰˜Ÿ	™	›Ô$Ø�‰˜Ÿ
™
Ô#Ø�‰˜Ÿ™Õ$r    c                óº  • U R                  5       n[        R                  " U5      nU R                  UR	                  5       5        UR                  5         U R                  UR                  5        [        R                  " U5      nU R                  UR	                  5       5        U R                  UR                  5        U R                  UR                  5        g)zt
If a lock is released cleanly, it can be re-acquired and the C{clean}
and C{locked} attributes are set to C{True}.
N)	r   r   rR   rx   rS   ÚunlockrT   rz   ry   r{   s      r   Útest_cleanlyReleaseÚ LockingTests.test_cleanlyRelease²   sŽ   € ð
 —‘“ˆÜ×&Ò& uÓ-ˆØ�‰˜Ÿ	™	›Ô$Ø�‰ŒØ×Ñ˜Ÿ™Ô%ä×&Ò& uÓ-ˆØ�‰˜Ÿ	™	›Ô$Ø�‰˜Ÿ
™
Ô#Ø�‰˜Ÿ™Õ$r    c                ó.  • U R                  5       n[        R                  " U5      nU R                  UR	                  5       5        [        R                  " U5      nU R                  UR	                  5       5        U R                  UR                  5        g)z;
If a lock is currently locked, it cannot be locked again.
N)r   r   rR   rx   rS   rT   rz   )r   rm   Ú	firstLockÚ
secondLocks       r   Útest_cannotLockLockedÚ"LockingTests.test_cannotLockLockedÂ   sk   € ð —‘“ˆÜ×+Ò+¨EÓ2ˆ	Ø�‰˜	Ÿ™Ó(Ô)ä×,Ò,¨UÓ3ˆ
Ø×Ñ˜Ÿ™Ó*Ô+Ø×Ñ˜×*Ñ*Õ+r    c                ó  ^• SmSU4S jjnU R                  5       nU R                  [        SU5        [        R                  " [	        T5      U5        [        R
                  " U5      nU R                  UR                  5       5        U R                  UR                  5        U R                  UR                  5        U R                  [        R                  " U5      [	        [        R                  " 5       5      5        g)z§
If a lock was held by a process which no longer exists, it can be
acquired, the C{clean} attribute is set to C{False}, and the
C{locked} attribute is set to C{True}.
i90  c                ó†   >• US:w  a  [        [        R                  S 5      eU T:X  a  [        [        R                  S 5      eg )Nr   ©r   r   ÚEPERMrN   )ÚpidÚsignalÚowners     €r   ÚfakeKillÚ4LockingTests.test_uncleanlyAcquire.<locals>.fakeKillÖ   s8   ø€ Ø˜‹{ÜœeŸk™k¨4Ó0Ð0Ø�e‹|ÜœeŸk™k¨4Ó0Ð0ð r    rG   N©r‹   ÚintrŒ   r‘   r/   rZ   )r   r0   r   r   r.   rR   rx   rS   rT   ry   rz   r   r5   rH   rI   )r   rŽ   rm   rS   r�   s       @r   Útest_uncleanlyAcquireÚ"LockingTests.test_uncleanlyAcquireÎ   sª   ø€ ð ˆ÷	1ð —‘“ˆØ�
‰
”8˜V XÔ.Ü×Òœ˜U› UÔ+ä×&Ò& uÓ-ˆØ�‰˜Ÿ	™	›Ô$Ø×Ñ˜Ÿ™Ô$Ø�‰˜Ÿ™Ô$à×Ñœ×*Ò*¨5Ó1´3´r·y²y³{Ó3CÕDr    c                ó¶  ^^• SUU4S jjnU R                  [        SU5      mSS jnU R                  [        SU5        U R                  5       m[        R                  " T5      n[        R                  " [        S5      T5        U R                  UR                  5       5        U R                  UR                  5        U R                  UR                  5        g)	zÐ
If the lock is initially held but then released before it can be
examined to determine if the process which held it still exists, it is
acquired and the C{clean} and C{locked} attributes are set to C{True}.
c                ó|   >• [         R                  " T5        TR                  5         [         R                  " U 5      $ r$   )r   ÚrmlinkÚrestorer5   )r   rm   ÚreadlinkPatchs    €€r   ÚfakeReadlinkÚ?LockingTests.test_lockReleasedBeforeCheck.<locals>.fakeReadlinkî   s,   ø€ ä�OŠO˜EÔ"à×!Ñ!Ô#Ü×$Ò$ TÓ*Ð*r    r5   c                ó„   • US:w  a  [        [        R                  S 5      eU S:X  a  [        [        R                  S 5      eg ©Nr   éu¨  r‰   ©r‹   rŒ   s     r   rŽ   Ú;LockingTests.test_lockReleasedBeforeCheck.<locals>.fakeKill÷   ó7   € Ø˜‹{ÜœeŸk™k¨4Ó0Ð0Ø�e‹|ÜœeŸk™k¨4Ó0Ð0ð r    rG   r�   N)r   r.   r/   r.   r�   ©
r0   r   r   rR   r   r.   rx   rS   ry   rz   )r   r™   rŽ   rS   rm   r˜   s       @@r   Útest_lockReleasedBeforeCheckÚ)LockingTests.test_lockReleasedBeforeCheckç   s™   ù€ ÷	+ð 	+ð Ÿ
™
¤8¨Z¸ÓFˆô	1ð 	�
‰
”8˜V XÔ.à—‘“ˆÜ×&Ò& uÓ-ˆÜ×Òœ˜U› UÔ+Ø�‰˜Ÿ	™	›Ô$Ø�‰˜Ÿ
™
Ô#Ø�‰˜Ÿ™Õ$r    r!   c                óü   • SS jnU R                  [        SU5        U R                  5       n[        R                  " U5      nU R	                  UR                  5       5        U R	                  UR                  5        g)a[  
If the lock is released while an attempt is made to acquire
it, the lock attempt fails and C{FilesystemLock.lock} returns
C{False}.  This can happen on Windows when L{lockfile.symlink}
fails with L{IOError} of C{EIO} because another process is in
the middle of a call to L{os.rmdir} (implemented in terms of
RemoveDirectory) which is not atomic.
c                ó6   • [        [        R                  S 5      er$   r%   r'   s     r   rk   ÚGLockingTests.test_lockReleasedDuringAcquireSymlink.<locals>.fakeSymlink  s   € ô œ%Ÿ)™) TÓ*Ð*r    r   Nr-   )r0   r   r   rR   rT   rS   rz   )r   rk   rm   rS   s       r   Ú%test_lockReleasedDuringAcquireSymlinkÚ2LockingTests.test_lockReleasedDuringAcquireSymlink  sZ   € ô	+ð
 	�
‰
”8˜Y¨Ô4à—‘“ˆÜ×&Ò& uÓ-ˆØ×Ñ˜Ÿ™›Ô%Ø×Ñ˜Ÿ™Õ%r    r9   c                ó<  • SS jnU R                  [        SU5        U R                  5       n[        R                  " U5      n[        R                  " [        S5      U5        U R                  UR                  5       5        U R                  UR                  5        g)z›
If the lock is initially held but is released while an attempt
is made to acquire it, the lock attempt fails and
L{FilesystemLock.lock} returns C{False}.
c                ó6   • [        [        R                  S 5      er$   r<   ©r   s    r   r™   ÚILockingTests.test_lockReleasedDuringAcquireReadlink.<locals>.fakeReadlink+  s   € ô œ%Ÿ,™,¨Ó-Ð-r    r5   r�   N©r   r.   r/   r   )	r0   r   r   rR   r   r.   rT   rS   rz   )r   r™   rm   rS   s       r   Ú&test_lockReleasedDuringAcquireReadlinkÚ3LockingTests.test_lockReleasedDuringAcquireReadlink   sn   € ô	.ð 	�
‰
”8˜Z¨Ô6à—‘“ˆÜ×&Ò& uÓ-ˆÜ×Òœ˜U› UÔ+Ø×Ñ˜Ÿ™›Ô%Ø×Ñ˜Ÿ™Õ%r    c                óz  ^^• SUU4S jjnU R                  [        SU5        U R                  5       n[        R                  " [	        S5      U5        [        R
                  " U5      nU R                  TUR                  5      nU R                  UR                  T5        U R                  UR                  5        g )Nc                ó   >• T" TS 5      er$   rX   )r   r   ÚexceptionTypes    €€r   r™   Ú5LockingTests._readlinkErrorTest.<locals>.fakeReadlink<  s   ø€ Ù  tÓ,Ð,r    r5   r�   r­   )r0   r   r   r   r.   rR   r   rS   r   r   rT   rz   )r   r²   r   r™   rm   rS   r   s    ``    r   Ú_readlinkErrorTestÚLockingTests._readlinkErrorTest9  sŒ   ù€ ÷	-ð 	-ð 	�
‰
”8˜Z¨Ô6à—‘“ˆô 	×Òœ˜U› UÔ+ä×&Ò& uÓ-ˆØ×Ñ ¨t¯y©yÓ9ˆØ×Ñ˜Ÿ™ EÔ*Ø×Ñ˜Ÿ™Õ%r    c                ó”   • U R                  [        [        R                  5        U R                  [        [        R                  5        g)zo
An exception raised by C{readlink} other than C{ENOENT} is passed up to
the caller of L{FilesystemLock.lock}.
N)r´   r   r   rq   r1   rJ   s    r   Útest_readlinkErrorÚLockingTests.test_readlinkErrorK  s,   € ð
 	×Ñ¤¬¯©Ô6Ø×Ñ¤¬¯©Õ6r    c                ó”   • U R                  [        [        R                  5        U R                  [        [        R                  5        g)zÒ
Any L{IOError} raised by C{readlink} on a POSIX platform passed to the
caller of L{FilesystemLock.lock}.

On POSIX, unlike on Windows, these are unexpected errors which cannot
be handled by L{FilesystemLock}.
N)r´   r1   r   rq   r=   rJ   s    r   Útest_readlinkErrorPOSIXÚ$LockingTests.test_readlinkErrorPOSIXS  s,   € ð 	×Ñ¤¬¯©Ô6Ø×Ñ¤¬¯©Õ6r    c                ó¶  ^^• SUU4S jjnU R                  [        SU5      mSS jnU R                  [        SU5        U R                  5       m[        R                  " T5      n[        R                  " [        S5      T5        U R                  UR                  5       5        U R                  UR                  5        U R                  UR                  5        g)	z·
If a second process cleans up the lock after a first one checks the
lock and finds that no process is holding it, the first process does
not fail when it tries to clean up the lock.
c                ó|   >• TR                  5         [        R                  " T5        [        R                  " U 5      $ r$   )r—   r   r–   )r   rm   ÚrmlinkPatchs    €€r   Ú
fakeRmlinkÚ?LockingTests.test_lockCleanedUpConcurrently.<locals>.fakeRmlinki  s*   ø€ Ø×ÑÔ!ä�OŠO˜EÔ"ä—?’? 4Ó(Ð(r    r–   c                ó„   • US:w  a  [        [        R                  S 5      eU S:X  a  [        [        R                  S 5      eg rœ   r‰   rž   s     r   rŽ   Ú=LockingTests.test_lockCleanedUpConcurrently.<locals>.fakeKillr  r    r    rG   r�   N)r   r.   r/   rZ   r�   r¡   )r   r¿   rŽ   rS   rm   r¾   s       @@r   Útest_lockCleanedUpConcurrentlyÚ+LockingTests.test_lockCleanedUpConcurrentlyb  s™   ù€ ÷	)ð 	)ð —j‘j¤¨8°ZÓ@ˆô	1ð 	�
‰
”8˜V XÔ.à—‘“ˆÜ×&Ò& uÓ-ˆÜ×Òœ˜U› UÔ+Ø�‰˜Ÿ	™	›Ô$Ø�‰˜Ÿ
™
Ô#Ø�‰˜Ÿ™Õ$r    c                óÊ  • SS jnU R                  [        SU5        SS jnU R                  [        SU5        U R                  5       n[        R                  " [	        S5      U5        [        R
                  " U5      nU R                  [        UR                  5      nU R                  UR                  [        R                  5        U R                  UR                  5        g)	zm
An exception raised by L{rmlink} other than C{ENOENT} is passed up
to the caller of L{FilesystemLock.lock}.
c                ó6   • [        [        R                  S 5      er$   )r   r   rq   r«   s    r   r¿   Ú1LockingTests.test_rmlinkError.<locals>.fakeRmlink‡  rB   r    r–   c                ó„   • US:w  a  [        [        R                  S 5      eU S:X  a  [        [        R                  S 5      eg rœ   r‰   rž   s     r   rŽ   Ú/LockingTests.test_rmlinkError.<locals>.fakeKillŒ  r    r    rG   r�   Nr­   r�   )r0   r   r   r   r.   rR   r   r   rS   r   r   rq   rT   rz   )r   r¿   rŽ   rm   rS   r   s         r   Útest_rmlinkErrorÚLockingTests.test_rmlinkError�  s¡   € ô	.ð 	�
‰
”8˜X zÔ2ô	1ð 	�
‰
”8˜V XÔ.à—‘“ˆô 	×Òœ˜U› UÔ+ä×&Ò& uÓ-ˆØ×Ñ¤¨¯©Ó3ˆØ×Ñ˜Ÿ™¤E§L¡LÔ1Ø×Ñ˜Ÿ™Õ%r    c                ó’  • SS jnU R                  [        SU5        U R                  5       n[        R                  " [	        S5      U5        [        R
                  " U5      nU R                  [        UR                  5      nU R                  UR                  [        R                  5        U R                  UR                  5        g)z–
If L{kill} raises an exception other than L{OSError} with errno set to
C{ESRCH}, the exception is passed up to the caller of
L{FilesystemLock.lock}.
c                ó6   • [        [        R                  S 5      er$   )r   r   rŠ   rž   s     r   rŽ   Ú-LockingTests.test_killError.<locals>.fakeKill¥  s   € Üœ%Ÿ+™+ tÓ,Ð,r    rG   r�   N)r‹   r‘   rŒ   r‘   r/   r   )r0   r   r   r   r.   rR   r   r   rS   r   r   rŠ   rT   rz   )r   rŽ   rm   rS   r   s        r   Útest_killErrorÚLockingTests.test_killErrorž  sŠ   € ô	-ð 	�
‰
”8˜V XÔ.à—‘“ˆô 	×Òœ˜U› UÔ+ä×&Ò& uÓ-ˆØ×Ñ¤¨¯©Ó3ˆØ×Ñ˜Ÿ™¤E§K¡KÔ0Ø×Ñ˜Ÿ™Õ%r    c                óü   • U R                  5       n[        R                  " [        [        R
                  " 5       S-   5      U5        [        R                  " U5      nU R                  [        UR                  5        g)zj
L{FilesystemLock.unlock} raises L{ValueError} if called for a lock
which is held by a different process.
é   N)
r   r   r   r.   rH   rI   rR   r   Ú
ValueErrorr   r{   s      r   Útest_unlockOtherÚLockingTests.test_unlockOther´  sR   € ð
 —‘“ˆÜ×ÒœœRŸYšY›[¨1™_Ó-¨uÔ5Ü×&Ò& uÓ-ˆØ×Ñœ* d§k¡kÕ2r    c                óŒ  • U R                  5       nU R                  [        R                  " U5      5        [        R                  " U5      nU R                  UR                  5       5        U R                  [        R                  " U5      5        UR                  5         U R                  [        R                  " U5      5        g)zX
L{isLocked} returns C{True} if the named lock is currently locked,
C{False} otherwise.
N)r   rT   r   ÚisLockedrR   rx   rS   r   r{   s      r   Útest_isLockedÚLockingTests.test_isLocked¾  sƒ   € ð
 —‘“ˆØ×Ñœ×*Ò*¨5Ó1Ô2Ü×&Ò& uÓ-ˆØ�‰˜Ÿ	™	›Ô$Ø�‰œ×)Ò)¨%Ó0Ô1Ø�‰ŒØ×Ñœ×*Ò*¨5Ó1Õ2r    rX   N)r   r‘   r/   rZ   rY   )r²   ztype[OSError] | type[IOError]r   r‘   r/   rZ   )r[   r\   r]   r^   rn   rr   r   r	   r`   ru   r|   r€   r…   r’   r¢   r   r§   r®   r´   r·   rº   rÃ   rÊ   rÏ   rÔ   rØ   rc   rX   r    r   re   re   …   s  † ô	+ô-ñ Ø×ÒÓØCóó	*ó	ð	*ô	%ô%ô 
,ôEô2%ñ> Ø×ÒÓØOóó&ó	ð&ñ, Ø×ÒÓØTóó&ó	ð&ð*&Ø:ð&ØCFð&à	ô&ô$7ñ Ø×ÒÓØCóó	7ó	ð	7ô%ô>&ô:&ô,3÷3r    re   )r_   Ú
__future__r   r   rH   Úunittestr   r   Útyping_extensionsr   Útwisted.pythonr   Útwisted.python.reflectr   Útwisted.python.runtimer	   Útwisted.trial.unittestr
   ra   rb   r`   r   re   rX   r    r   Ú<module>rá      sƒ   ðñ
õ #ã Û 	ß 'å &å #Ý 0Ý +Ý +à€Ø€Ø×Ò×ÑáÐ,Ó-Ñ5Ù˜,Ó'Ñ/àˆð<ð 	ô_$�ô _$ôDD3�8õ D3r    