§
    Ètºfh2  ã                   óZ  — d Z ddlZddlmZ ddlmZmZ ddlm	Z	m
Z
mZ ddlmZ ddlmZ ddlZddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZmZmZmZmZmZmZ de
de	f         de
de	f         fd„Z  G d„ dej!        j"        j#        ¦  «        Z$ G d„ dej!        j"        j#        ¦  «        Z%dS )z3
Tests for L{twisted.application.runner._pidfile}.
é    N)Úwraps)ÚgetpidÚname)ÚAnyÚCallableÚOptional)ÚverifyObject)ÚNoReturn)ÚFilePath)Úplatform)ÚSkipTesté   )Ú_pidfileé   )ÚAlreadyRunningErrorÚInvalidPIDFileErrorÚIPIDFileÚNonePIDFileÚ
NoPIDFoundÚPIDFileÚStalePIDFileErrorÚf.Úreturnc           	      óv   ‡ — t          ‰ ¦  «        dt          dt          dt          dt          fˆ fd„¦   «         }|S )a=  
    Decorator for tests that are not expected to work on all platforms.

    Calling L{PIDFile.isRunning} currently raises L{NotImplementedError} on
    non-POSIX platforms.

    On an unsupported platform, we expect to see any test that calls
    L{PIDFile.isRunning} to raise either L{NotImplementedError}, L{SkipTest},
    or C{self.failureException}.
    (C{self.failureException} may occur in a test that checks for a specific
    exception but it gets NotImplementedError instead.)

    @param f: The test method to decorate.

    @return: The wrapped callable.
    ÚselfÚargsÚkwargsr   c                 ó4  •— t          j        ¦   «         dk    }|r ‰| g|¢R i |¤ŽS  | j        t          t          | j        f‰| g|¢R i |¤Ž}t          |t          ¦  «        r7|                      t          |¦  «         	                    d¦  «        ¦  «         d S d S )NÚposixz isRunning is not implemented on )
r   ÚgetTypeÚassertRaisesÚNotImplementedErrorr   ÚfailureExceptionÚ
isinstanceÚ
assertTrueÚstrÚ
startswith)r   r   r   Ú	supportedÚer   s        €úk/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/application/runner/test/test_pidfile.pyÚwrapperz$ifPlatformSupported.<locals>.wrapper3   sÓ   ø€ åÔ$Ñ&Ô&¨'Ò1ˆ	àð 	WØ�1�TÐ+˜DÐ+Ð+Ð+ FÐ+Ð+Ð+à!�Ô!Ý$¥h°Ô0EÐFØØðð ð	ð ð ð
 ðð ˆAõ ˜!Õ0Ñ1Ô1ð WØ—’¥ A¡¤× 1Ò 1Ð2TÑ UÔ UÑVÔVÐVÐVÐVðWð Wó    )r   r   )r   r+   s   ` r*   ÚifPlatformSupportedr-   !   s`   ø€ õ$ ˆ1�X„XðW•cð W¥#ð Wµð W½ð Wð Wð Wð Wð Wñ „XðWð  €Nr,   c                   ód  — e Zd ZdZddee         dee         fd„Zdd„Z	dd„Z
dd„Zdd	„Zdd
„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zedd„¦   «         Zedd„¦   «         Zedd„¦   «         Zedd„¦   «         Zedd„¦   «         Zedd„¦   «         Zdd„Zdd„Zedd„¦   «         Zedd„¦   «         ZdS )ÚPIDFileTestsz
    Tests for L{PIDFile}.
    NÚcontentr   c                 óv   — t          |                      ¦   «         ¦  «        }|�|                     |¦  «         |S ©N)r   ÚmktempÚ
setContent)r   r0   ÚfilePaths      r*   r5   zPIDFileTests.filePathL   s6   € Ý˜DŸKšK™MœMÑ*Ô*ˆØÐØ×Ò Ñ(Ô(Ð(Øˆr,   c                 ór   — t          |                      ¦   «         ¦  «        }t          t          |¦  «         dS )z5
        L{PIDFile} conforms to L{IPIDFile}.
        N)r   r5   r	   r   ©r   ÚpidFiles     r*   Útest_interfacezPIDFileTests.test_interfaceR   s/   € õ ˜$Ÿ-š-™/œ/Ñ*Ô*ˆÝ•X˜wÑ'Ô'Ð'Ð'Ð'r,   c                 óX   — |                       t          j        d¬¦  «        d¦  «         dS )zR
        L{PIDFile._format} returns the expected format when given a PID.
        é9  ©Úpids   1337
N)ÚassertEqualr   Ú_format)r   s    r*   Útest_formatWithPIDzPIDFileTests.test_formatWithPIDY   s-   € ð 	×Ò�œ¨TÐ2Ñ2Ô2°IÑ>Ô>Ð>Ð>Ð>r,   c                 óÄ   — d}t          |                      t          j        |¬¦  «        ¦  «        ¦  «        }|                      ||                     ¦   «         ¦  «         dS )zK
        L{PIDFile.read} returns the PID from the given file path.
        r;   r<   N)r   r5   r?   r>   Úread©r   r=   r8   s      r*   Útest_readWithPIDzPIDFileTests.test_readWithPID_   sS   € ð ˆå˜$Ÿ-š-­¬¸CÐ(@Ñ(@Ô(@ÑAÔAÑBÔBˆà×Ò˜˜gŸlšl™nœnÑ-Ô-Ð-Ð-Ð-r,   c                 óÚ   — d}t          |                      d¦  «        ¦  «        }|                      t          |j        ¦  «        }|                      t          |¦  «        d|›�¦  «         dS )úf
        L{PIDFile.read} raises L{InvalidPIDFileError} when given an empty file
        path.
        r,   ú#non-integer PID value in PID file: N©r   r5   r!   r   rB   r>   r&   ©r   ÚpidValuer8   r)   s       r*   Útest_readEmptyPIDzPIDFileTests.test_readEmptyPIDi   se   € ð
 ˆÝ˜$Ÿ-š-¨Ñ,Ô,Ñ-Ô-ˆà×ÒÕ1°7´<Ñ@Ô@ˆØ×Ò�˜Q™œÐ!SÀxÐ!SÐ!SÑTÔTÐTÐTÐTr,   c                 óÚ   — d}t          |                      |¦  «        ¦  «        }|                      t          |j        ¦  «        }|                      t          |¦  «        d|›�¦  «         dS )rF   s   $foo!rG   NrH   rI   s       r*   Útest_readWithBogusPIDz"PIDFileTests.test_readWithBogusPIDt   se   € ð
 ˆÝ˜$Ÿ-š-¨Ñ1Ô1Ñ2Ô2ˆà×ÒÕ1°7´<Ñ@Ô@ˆØ×Ò�˜Q™œÐ!SÀxÐ!SÐ!SÑTÔTÐTÐTÐTr,   c                 óÎ   — t          |                      ¦   «         ¦  «        }|                      t          |j        ¦  «        }|                      t          |¦  «        d¦  «         dS )zc
        L{PIDFile.read} raises L{NoPIDFound} when given a non-existing file
        path.
        úPID file does not existN)r   r5   r!   r   rB   r>   r&   ©r   r8   r)   s      r*   Útest_readDoesntExistz!PIDFileTests.test_readDoesntExist   sS   € õ
 ˜$Ÿ-š-™/œ/Ñ*Ô*ˆà×Ò�j¨'¬,Ñ7Ô7ˆØ×Ò�˜Q™œÐ!:Ñ;Ô;Ð;Ð;Ð;r,   c                 ó0  — ddt           dt          fd„}|                      t          d|¦  «         t	          |                      ¦   «         ¦  «        }|                      t          |j        ¦  «        }|  	                    |j
        t          j        ¦  «         dS )z�
        L{PIDFile.read} re-raises L{OSError} if the associated C{errno} is
        anything other than L{errno.ENOENT}.
        ÚrÚmoder   c                 ó6   — t          t          j        d¦  «        ‚)Nz	I/O error)ÚOSErrorÚerrnoÚEIO)rT   s    r*   Úoopsz>PIDFileTests.test_readOpenRaisesOSErrorNotENOENT.<locals>.oops�   s   € Ý�%œ) [Ñ1Ô1Ð1r,   ÚopenN)rS   )r&   r
   Úpatchr   r   r5   r!   rV   rB   r>   rW   rX   )r   rY   r8   Úerrors       r*   Ú#test_readOpenRaisesOSErrorNotENOENTz0PIDFileTests.test_readOpenRaisesOSErrorNotENOENT‰   s�   € ð	2ð 	2•sð 	2¥Xð 	2ð 	2ð 	2ð 	2ð 	�
Š
•8˜V TÑ*Ô*Ð*å˜$Ÿ-š-™/œ/Ñ*Ô*ˆà×!Ò!¥'¨7¬<Ñ8Ô8ˆØ×Ò˜œ¥e¤iÑ0Ô0Ð0Ð0Ð0r,   c                 óÆ   — d}t          |                      ¦   «         ¦  «        }|                     |¦  «         |                      |                     ¦   «         |¦  «         dS )z9
        L{PIDFile._write} stores the given PID.
        iË  N)r   r5   Ú_writer>   rB   rC   s      r*   Útest_writePIDzPIDFileTests.test_writePID™   sT   € ð ˆå˜$Ÿ-š-™/œ/Ñ*Ô*ˆØ�Š�sÑÔÐà×Ò˜Ÿš™œ¨Ñ-Ô-Ð-Ð-Ð-r,   c                 óŠ   — t          |                      ¦   «         ¦  «        }|                      t          |j        d¦  «         dS )zS
        L{PIDFile._write} raises L{ValueError} when given an invalid PID.
        ÚburpN)r   r5   r!   Ú
ValueErrorr_   r7   s     r*   Útest_writePIDInvalidz!PIDFileTests.test_writePIDInvalid¤   s9   € õ ˜$Ÿ-š-™/œ/Ñ*Ô*ˆà×Ò�* g¤n°fÑ=Ô=Ð=Ð=Ð=r,   c                 óØ   — t          |                      ¦   «         ¦  «        }|                     ¦   «          |                      |                     ¦   «         t          ¦   «         ¦  «         dS )zT
        L{PIDFile.writeRunningPID} stores the PID for the current process.
        N)r   r5   ÚwriteRunningPIDr>   rB   r   r7   s     r*   Útest_writeRunningPIDz!PIDFileTests.test_writeRunningPID¬   sS   € õ ˜$Ÿ-š-™/œ/Ñ*Ô*ˆØ×ÒÑ!Ô!Ð!à×Ò˜Ÿš™œ­©¬Ñ2Ô2Ð2Ð2Ð2r,   c                 ó"  — t          |                      d¦  «        ¦  «        }|                      |j                             ¦   «         ¦  «         |                     ¦   «          |                      |j                             ¦   «         ¦  «         dS )z9
        L{PIDFile.remove} removes the PID file.
        r,   N)r   r5   r%   ÚexistsÚremoveÚassertFalser7   s     r*   Útest_removezPIDFileTests.test_removeµ   sw   € õ ˜$Ÿ-š-¨Ñ,Ô,Ñ-Ô-ˆØ�Š˜Ô(×/Ò/Ñ1Ô1Ñ2Ô2Ð2à�ŠÑÔÐØ×Ò˜Ô)×0Ò0Ñ2Ô2Ñ3Ô3Ð3Ð3Ð3r,   c                 ó   — t          |                      ¦   «         ¦  «        }|                     d¦  «         dt          dt          ddfd„}|                      t
          d|¦  «         |                      |                     ¦   «         ¦  «         dS )zR
        L{PIDFile.isRunning} returns true for a process that does exist.
        r;   r=   Úsignalr   Nc                 ó   — d S r2   © ©r=   rn   s     r*   Úkillz2PIDFileTests.test_isRunningDoesExist.<locals>.killÇ   ó   € ØˆFr,   rr   ©r   r5   r_   Úintr[   r   r%   Ú	isRunning©r   r8   rr   s      r*   Útest_isRunningDoesExistz$PIDFileTests.test_isRunningDoesExist¿   s�   € õ
 ˜$Ÿ-š-™/œ/Ñ*Ô*ˆØ�Š�tÑÔÐð	•cð 	¥3ð 	¨4ð 	ð 	ð 	ð 	ð 	�
Š
•8˜V TÑ*Ô*Ð*à�Š˜×)Ò)Ñ+Ô+Ñ,Ô,Ð,Ð,Ð,r,   c                 ó¾   — t          |                      ¦   «         ¦  «        }|                     ¦   «          |                      |                     ¦   «         ¦  «         dS )a@  
        L{PIDFile.isRunning} returns true for this process (which is running).

        @note: This differs from L{PIDFileTests.test_isRunningDoesExist} in
        that it actually invokes the C{kill} system call, which is useful for
        testing of our chosen method for probing the existence of a process.
        N)r   r5   rf   r%   rv   r7   s     r*   Útest_isRunningThiszPIDFileTests.test_isRunningThisÎ   sO   € õ ˜$Ÿ-š-™/œ/Ñ*Ô*ˆØ×ÒÑ!Ô!Ð!à�Š˜×)Ò)Ñ+Ô+Ñ,Ô,Ð,Ð,Ð,r,   c                 ó  — t          |                      ¦   «         ¦  «        }|                     d¦  «         dt          dt          ddfd„}|                      t
          d|¦  «         |                      t          |j        ¦  «         dS )z{
        L{PIDFile.isRunning} raises L{StalePIDFileError} for a process that
        does not exist (errno=ESRCH).
        r;   r=   rn   r   Nc                 ó6   — t          t          j        d¦  «        ‚©NzNo such process©rV   rW   ÚESRCHrq   s     r*   rr   z5PIDFileTests.test_isRunningDoesNotExist.<locals>.killå   ó   € Ý�%œ+Ð'8Ñ9Ô9Ð9r,   rr   )	r   r5   r_   ru   r[   r   r!   r   rv   rw   s      r*   Útest_isRunningDoesNotExistz'PIDFileTests.test_isRunningDoesNotExistÜ   sŒ   € õ ˜$Ÿ-š-™/œ/Ñ*Ô*ˆØ�Š�tÑÔÐð	:•cð 	:¥3ð 	:¨4ð 	:ð 	:ð 	:ð 	:ð 	�
Š
•8˜V TÑ*Ô*Ð*à×ÒÕ+¨WÔ->Ñ?Ô?Ð?Ð?Ð?r,   c                 ó   — t          |                      ¦   «         ¦  «        }|                     d¦  «         dt          dt          ddfd„}|                      t
          d|¦  «         |                      |                     ¦   «         ¦  «         dS )zx
        L{PIDFile.isRunning} returns true for a process that we are not allowed
        to kill (errno=EPERM).
        r;   r=   rn   r   Nc                 ó6   — t          t          j        d¦  «        ‚)NzOperation not permitted)rV   rW   ÚEPERMrq   s     r*   rr   z3PIDFileTests.test_isRunningNotAllowed.<locals>.killõ   s   € Ý�%œ+Ð'@ÑAÔAÐAr,   rr   rt   rw   s      r*   Útest_isRunningNotAllowedz%PIDFileTests.test_isRunningNotAllowedì   s—   € õ ˜$Ÿ-š-™/œ/Ñ*Ô*ˆØ�Š�tÑÔÐð	B•cð 	B¥3ð 	B¨4ð 	Bð 	Bð 	Bð 	Bð 	�
Š
•8˜V TÑ*Ô*Ð*à�Š˜×)Ò)Ñ+Ô+Ñ,Ô,Ð,Ð,Ð,r,   c                 óô   — t           dk    rt          d¦  «        ‚t          |                      ¦   «         ¦  «        }|                     d¦  «         |                      |                     ¦   «         ¦  «         dS )ac  
        L{PIDFile.isRunning} returns true for a process that we are not allowed
        to kill (errno=EPERM).

        @note: This differs from L{PIDFileTests.test_isRunningNotAllowed} in
        that it actually invokes the C{kill} system call, which is useful for
        testing of our chosen method for probing the existence of a process
        that we are not allowed to kill.

        @note: In this case, we try killing C{init}, which is process #1 on
        POSIX systems, so this test is not portable.  C{init} should always be
        running and should not be killable by non-root users.
        r   zThis test assumes POSIXé   N)ÚSYSTEM_NAMEr   r   r5   r_   r%   rv   r7   s     r*   Útest_isRunningInitzPIDFileTests.test_isRunningInitü   si   € õ ˜'Ò!Ð!ÝÐ4Ñ5Ô5Ð5å˜$Ÿ-š-™/œ/Ñ*Ô*ˆØ�Š�qÑÔÐà�Š˜×)Ò)Ñ+Ô+Ñ,Ô,Ð,Ð,Ð,r,   c                 ó  — t          |                      ¦   «         ¦  «        }|                     ¦   «          dt          dt          ddfd„}|                      t
          d|¦  «         |                      t          |j        ¦  «         dS )zŠ
        L{PIDFile.isRunning} re-raises L{OSError} if the attached C{errno}
        value from L{os.kill} is not an expected one.
        r=   rn   r   Nc                 ó6   — t          t          j        d¦  «        ‚)NzFile exists)rV   rW   ÚEEXISTrq   s     r*   rr   z5PIDFileTests.test_isRunningUnknownErrno.<locals>.kill  s   € Ý�%œ,¨Ñ6Ô6Ð6r,   rr   )	r   r5   rf   ru   r[   r   r!   rV   rv   rw   s      r*   Útest_isRunningUnknownErrnoz'PIDFileTests.test_isRunningUnknownErrno  s‹   € õ ˜$Ÿ-š-™/œ/Ñ*Ô*ˆØ×ÒÑ!Ô!Ð!ð	7•cð 	7¥3ð 	7¨4ð 	7ð 	7ð 	7ð 	7ð 	�
Š
•8˜V TÑ*Ô*Ð*à×Ò�' 7Ô#4Ñ5Ô5Ð5Ð5Ð5r,   c                 ó–   — t          |                      ¦   «         ¦  «        }|                      |                     ¦   «         ¦  «         dS )zS
        L{PIDFile.isRunning} returns false if the PID file doesn't exist.
        N)r   r5   rk   rv   r7   s     r*   Útest_isRunningNoPIDFilez$PIDFileTests.test_isRunningNoPIDFile#  s?   € õ ˜$Ÿ-š-™/œ/Ñ*Ô*ˆà×Ò˜×*Ò*Ñ,Ô,Ñ-Ô-Ð-Ð-Ð-r,   c                 óì  — t          |                      ¦   «         ¦  «        }|                      |j                             ¦   «         ¦  «         |5  |                      |j                             ¦   «         ¦  «         |                      |                     ¦   «         t          ¦   «         ¦  «         ddd¦  «         n# 1 swxY w Y   |                      |j                             ¦   «         ¦  «         dS )zŽ
        When used as a context manager, a L{PIDFile} will store the current pid
        on entry, then removes the PID file on exit.
        N)r   r5   rk   ri   r%   r>   rB   r   r7   s     r*   Útest_contextManagerz PIDFileTests.test_contextManager+  s  € õ
 ˜$Ÿ-š-™/œ/Ñ*Ô*ˆØ×Ò˜Ô)×0Ò0Ñ2Ô2Ñ3Ô3Ð3àð 	7ð 	7Ø�OŠO˜GÔ,×3Ò3Ñ5Ô5Ñ6Ô6Ð6Ø×Ò˜WŸ\š\™^œ^­V©X¬XÑ6Ô6Ð6ð	7ð 	7ð 	7ñ 	7ô 	7ð 	7ð 	7ð 	7ð 	7ð 	7ð 	7øøøð 	7ð 	7ð 	7ð 	7ð 	×Ò˜Ô)×0Ò0Ñ2Ô2Ñ3Ô3Ð3Ð3Ð3s   ÁA!B=Â=CÃCc                 óö  — t          |                      ¦   «         ¦  «        }|                     d¦  «         dt          dt          ddfd„}|                      t
          d|¦  «         |                      t          |j        ¦  «        }|  	                    t          |¦  «        d¦  «         |5  |  	                    |                     ¦   «         t          ¦   «         ¦  «         ddd¦  «         dS # 1 swxY w Y   dS )	zß
        When used as a context manager, a L{PIDFile} will replace the
        underlying PIDFile rather than raising L{AlreadyRunningError} if the
        contained PID file exists but refers to a non-running PID.
        r;   r=   rn   r   Nc                 ó6   — t          t          j        d¦  «        ‚r}   r~   rq   s     r*   rr   z9PIDFileTests.test_contextManagerDoesntExist.<locals>.killC  r€   r,   rr   z'PID file refers to non-existing process)r   r5   r_   ru   r[   r   r!   r   rv   r>   r&   rB   r   )r   r8   rr   r)   s       r*   Útest_contextManagerDoesntExistz+PIDFileTests.test_contextManagerDoesntExist9  s.  € õ ˜$Ÿ-š-™/œ/Ñ*Ô*ˆØ�Š�tÑÔÐð	:•cð 	:¥3ð 	:¨4ð 	:ð 	:ð 	:ð 	:ð 	�
Š
•8˜V TÑ*Ô*Ð*à×ÒÕ/°Ô1BÑCÔCˆØ×Ò�˜Q™œÐ!JÑKÔKÐKàð 	7ð 	7Ø×Ò˜WŸ\š\™^œ^­V©X¬XÑ6Ô6Ð6ð	7ð 	7ð 	7ñ 	7ô 	7ð 	7ð 	7ð 	7ð 	7ð 	7ð 	7ð 	7øøøð 	7ð 	7ð 	7ð 	7ð 	7ð 	7s   Â,5C.Ã.C2Ã5C2c                 ó`  — t          |                      ¦   «         ¦  «        }|                     d¦  «         dt          dt          ddfd„}|                      t
          d|¦  «         |                      |                     ¦   «         ¦  «         |                      t          |j
        ¦  «         dS )z²
        When used as a context manager, a L{PIDFile} will raise
        L{AlreadyRunningError} if the there is already a running process with
        the contained PID.
        r;   r=   rn   r   Nc                 ó   — d S r2   rp   rq   s     r*   rr   z<PIDFileTests.test_contextManagerAlreadyRunning.<locals>.killX  rs   r,   rr   )r   r5   r_   ru   r[   r   r%   rv   r!   r   Ú	__enter__rw   s      r*   Ú!test_contextManagerAlreadyRunningz.PIDFileTests.test_contextManagerAlreadyRunningN  sª   € õ ˜$Ÿ-š-™/œ/Ñ*Ô*ˆØ�Š�tÑÔÐð	•cð 	¥3ð 	¨4ð 	ð 	ð 	ð 	ð 	�
Š
•8˜V TÑ*Ô*Ð*à�Š˜×)Ò)Ñ+Ô+Ñ,Ô,Ð,à×ÒÕ-¨wÔ/@ÑAÔAÐAÐAÐAr,   r2   ©r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úbytesr   r&   r5   r9   r@   rD   rK   rM   rQ   r]   r`   rd   rg   rl   r-   rx   rz   r�   r…   r‰   r�   r�   r‘   r”   r˜   rp   r,   r*   r/   r/   G   sk  € € € € € ðð ðð  ¨¤ð ¸8ÀC¼=ð ð ð ð ð(ð (ð (ð (ð?ð ?ð ?ð ?ð.ð .ð .ð .ð	Uð 	Uð 	Uð 	Uð	Uð 	Uð 	Uð 	Uð<ð <ð <ð <ð1ð 1ð 1ð 1ð 	.ð 	.ð 	.ð 	.ð>ð >ð >ð >ð3ð 3ð 3ð 3ð4ð 4ð 4ð 4ð ð-ð -ð -ñ Ôð-ð ð-ð -ð -ñ Ôð-ð ð@ð @ð @ñ Ôð@ð ð-ð -ð -ñ Ôð-ð ð-ð -ð -ñ Ôð-ð, ð6ð 6ð 6ñ Ôð6ð.ð .ð .ð .ð4ð 4ð 4ð 4ð ð7ð 7ð 7ñ Ôð7ð( ðBð Bð Bñ ÔðBð Bð Br,   r/   c                   óJ   — e Zd ZdZdd„Zdd„Zdd„Zdd„Zdd„Zdd	„Z	dd
„Z
dS )ÚNonePIDFileTestsz#
    Tests for L{NonePIDFile}.
    r   Nc                 óL   — t          ¦   «         }t          t          |¦  «         dS )z9
        L{NonePIDFile} conforms to L{IPIDFile}.
        N)r   r	   r   r7   s     r*   r9   zNonePIDFileTests.test_interfaceg  s#   € õ ‘-”-ˆÝ•X˜wÑ'Ô'Ð'Ð'Ð'r,   c                 ó¨   — t          ¦   «         }|                      t          |j        ¦  «        }|                      t          |¦  «        d¦  «         dS )z;
        L{NonePIDFile.read} raises L{NoPIDFound}.
        rO   N)r   r!   r   rB   r>   r&   rP   s      r*   Ú	test_readzNonePIDFileTests.test_readn  sG   € õ ‘-”-ˆà×Ò�j¨'¬,Ñ7Ô7ˆØ×Ò�˜Q™œÐ!:Ñ;Ô;Ð;Ð;Ð;r,   c                 ó®   — t          ¦   «         }|                      t          |j        d¦  «        }|                      |j        t
          j        ¦  «         dS )zZ
        L{NonePIDFile._write} raises L{OSError} with an errno of L{errno.EPERM}.
        r   N)r   r!   rV   r_   r>   rW   r„   ©r   r8   r\   s      r*   Ú
test_writezNonePIDFileTests.test_writew  sF   € õ ‘-”-ˆà×!Ò!¥'¨7¬>¸1Ñ=Ô=ˆØ×Ò˜œ¥e¤kÑ2Ô2Ð2Ð2Ð2r,   c                 ó¬   — t          ¦   «         }|                      t          |j        ¦  «        }|                      |j        t
          j        ¦  «         dS )zk
        L{NonePIDFile.writeRunningPID} raises L{OSError} with an errno of
        L{errno.EPERM}.
        N)r   r!   rV   rf   r>   rW   r„   r¥   s      r*   rg   z%NonePIDFileTests.test_writeRunningPID€  sE   € õ
 ‘-”-ˆà×!Ò!¥'¨7Ô+BÑCÔCˆØ×Ò˜œ¥e¤kÑ2Ô2Ð2Ð2Ð2r,   c                 ó¬   — t          ¦   «         }|                      t          |j        ¦  «        }|                      |j        t
          j        ¦  «         dS )zZ
        L{NonePIDFile.remove} raises L{OSError} with an errno of L{errno.EPERM}.
        N)r   r!   rV   rj   r>   rW   ÚENOENTr¥   s      r*   rl   zNonePIDFileTests.test_removeŠ  sD   € õ ‘-”-ˆà×!Ò!¥'¨7¬>Ñ:Ô:ˆØ×Ò˜œ¥e¤lÑ3Ô3Ð3Ð3Ð3r,   c                 ór   — t          ¦   «         }|                      |                     ¦   «         d¦  «         dS )z<
        L{NonePIDFile.isRunning} returns L{False}.
        FN)r   r>   rv   r7   s     r*   Útest_isRunningzNonePIDFileTests.test_isRunning“  s5   € õ ‘-”-ˆà×Ò˜×*Ò*Ñ,Ô,¨eÑ4Ô4Ð4Ð4Ð4r,   c                 óZ   — t          ¦   «         }|5  	 ddd¦  «         dS # 1 swxY w Y   dS )zo
        When used as a context manager, a L{NonePIDFile} doesn't raise, despite
        not existing.
        N)r   r7   s     r*   r‘   z$NonePIDFileTests.test_contextManager›  sz   € õ
 ‘-”-ˆàð 	ð 	Øð	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð 	ð 	s   ‘  $§$r™   )rš   r›   rœ   r�   r9   r£   r¦   rg   rl   r«   r‘   rp   r,   r*   r    r    b  sª   € € € € € ðð ð(ð (ð (ð (ð<ð <ð <ð <ð3ð 3ð 3ð 3ð3ð 3ð 3ð 3ð4ð 4ð 4ð 4ð5ð 5ð 5ð 5ðð ð ð ð ð r,   r    )&r�   rW   Ú	functoolsr   Úosr   r   rˆ   Útypingr   r   r   Úzope.interface.verifyr	   Útyping_extensionsr
   Útwisted.trial.unittestÚtwistedÚtwisted.python.filepathr   Útwisted.python.runtimer   r   Úrunnerr   r   r   r   r   r   r   r   r-   ÚtrialÚunittestÚTestCaser/   r    rp   r,   r*   ú<module>rº      sò  ððð ð €€€Ø Ð Ð Ð Ð Ð Ø *Ð *Ð *Ð *Ð *Ð *Ð *Ð *Ø *Ð *Ð *Ð *Ð *Ð *Ð *Ð *Ð *Ð *à .Ð .Ð .Ð .Ð .Ð .à &Ð &Ð &Ð &Ð &Ð &à Ð Ð Ð Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø +Ð +Ð +Ð +Ð +Ð +Ø +Ð +Ð +Ð +Ð +Ð +Ø Ð Ð Ð Ð Ð ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð#˜8 C¨ HÔ-ð #°(¸3À¸8Ô2Dð #ð #ð #ð #ðLXBð XBð XBð XBð XB�7”=Ô)Ô2ñ XBô XBð XBðvAð Að Að Að A�w”}Ô-Ô6ñ Aô Að Að Að Ar,   