Uname:Linux server2.hostofiraq.site 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64

Base Dir : /home/iscmbt-kufa-atu/public_html

User : iscmbt-kufa-atu


403WebShell
403Webshell
Server IP : 89.117.53.150  /  Your IP : 216.73.216.11
Web Server : Apache
System : Linux server2.hostofiraq.site 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
User : iscmbt-kufa-atu ( 1014)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/twisted/application/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/twisted/application/test/__pycache__/test_service.cpython-310.pyc
o

�b/�@s�dZddlmZddlmZddlmZddlmZm	Z	m
Z
mZmZddl
mZddlmZee
�Gdd	�d	��ZGd
d�de�ZGdd
�d
e�ZdS)z+
Tests for L{twisted.application.service}.
�)�implementer)�BrokenImplementation)�verifyObject)�Application�IProcess�IService�IServiceCollection�Service)�IPersistable)�TestCasec@s`eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�
AlmostServicea�
    Implement IService in a way that can fail.

    In general, classes should maintain invariants that adhere
    to the interfaces that they claim to implement --
    otherwise, it is a bug.

    This is a buggy class -- the IService implementation is fragile,
    and several methods will break it. These bugs are intentional,
    as the tests trigger them -- and then check that the class,
    indeed, no longer complies with the interface (IService)
    that it claims to comply with.

    Since the verification will, by definition, only fail on buggy classes --
    in other words, those which do not actually support the interface they
    claim to support, we have to write a buggy class to properly verify
    the interface.
    cCs||_||_||_dS)N)�name�parent�running)�selfr
rr�r�G/usr/lib/python3/dist-packages/twisted/application/test/test_service.py�__init__-s
zAlmostService.__init__cC�|`dS)z�
        Probably not a wise method to call.

        This method removes the :code:`name` attribute,
        which has to exist in IService classes.
        N)r
�rrrr�makeInvalidByDeletingName2�z'AlmostService.makeInvalidByDeletingNamecCr)z�
        Probably not a wise method to call.

        This method removes the :code:`parent` attribute,
        which has to exist in IService classes.
        N)rrrrr�makeInvalidByDeletingParent;rz)AlmostService.makeInvalidByDeletingParentcCr)z�
        Probably not a wise method to call.

        This method removes the :code:`running` attribute,
        which has to exist in IService classes.
        N)rrrrr�makeInvalidByDeletingRunningDrz*AlmostService.makeInvalidByDeletingRunningcC�dS)z\
        See L{twisted.application.service.IService}.

        @param name: ignored
        Nr)rr
rrr�setNameM�zAlmostService.setNamecCr)z^
        See L{twisted.application.service.IService}.

        @param parent: ignored
        Nr)rrrrr�setServiceParentTrzAlmostService.setServiceParentcCr�z>
        See L{twisted.application.service.IService}.
        Nrrrrr�disownServiceParent[rz!AlmostService.disownServiceParentcCrrrrrrr�privilegedStartService`rz$AlmostService.privilegedStartServicecCrrrrrrr�startServiceerzAlmostService.startServicecCrrrrrrr�stopServicejrzAlmostService.stopServiceN)�__name__�
__module__�__qualname__�__doc__rrrrrrrr r!r"rrrrrs			rc@s@eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dS)�ServiceInterfaceTestszK
    Tests for L{twisted.application.service.IService} implementation.
    cCstdddd�|_dS)z;
        Build something that implements IService.
        NF)rrr
)r�
almostServicerrrr�setUpuszServiceInterfaceTests.setUpcCst�}tt|�dS)z.
        Service implements IService.
        N)r	rr)r�	myServicerrr�test_realService{sz&ServiceInterfaceTests.test_realServicecCstt|j�dS)z4
        AlmostService implements IService.
        N)rrr(rrrr�test_hasAll�sz!ServiceInterfaceTests.test_hasAllcC�F|j��|�t��tt|j�Wd�dS1swYdS)zI
        AlmostService with no name does not implement IService.
        N)r(r�assertRaisesrrrrrrr�test_noName��
"�z!ServiceInterfaceTests.test_noNamecCr-)zK
        AlmostService with no parent does not implement IService.
        N)r(rr.rrrrrrr�
test_noParent�r0z#ServiceInterfaceTests.test_noParentcCr-)zL
        AlmostService with no running does not implement IService.
        N)r(rr.rrrrrrr�test_noRunning�r0z$ServiceInterfaceTests.test_noRunningN)
r#r$r%r&r)r+r,r/r1r2rrrrr'psr'c@seZdZdZdd�ZdS)�ApplicationTestsz?
    Tests for L{twisted.application.service.Application}.
    cCs\td�}|�ttt|���|�ttt|���|�ttt|���|�ttt|���dS)zQ
        Check L{twisted.application.service.Application} instantiation.
        zapp-nameN)r�
assertTruerrrrr
)r�apprrr�test_applicationComponents�s
z+ApplicationTests.test_applicationComponentsN)r#r$r%r&r6rrrrr3�sr3N)r&�zope.interfacer�zope.interface.exceptionsr�zope.interface.verifyr�twisted.application.servicerrrrr	�twisted.persisted.sobr
�twisted.trial.unittestrrr'r3rrrr�<module>sW1

Youez - 2016 - github.com/yon3zu
LinuXploit