AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/twisted/trial/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /usr/lib/python3/dist-packages/twisted/trial/test/__pycache__/mockdoctest.cpython-310.pyc
o

�bu	�@sGdd�d�ZdS)c@sbeZdZdZdZddd�Zdd�Zded	efd
d�Z	ded	efdd
�Z
dd�Zdd�Zdd�Z
dS)�Counterz�a simple counter object for testing trial's doctest support

    >>> c = Counter()
    >>> c.value()
    0
    >>> c += 3
    >>> c.value()
    3
    >>> c.incr()
    >>> c.value() == 4
    True
    >>> c == 4
    True
    >>> c != 9
    True

    �NcCs||_||_dS)N)�_count�maxval)�self�initialValuer�r�@/usr/lib/python3/dist-packages/twisted/trial/test/mockdoctest.py�__init__s
zCounter.__init__cCs4|jdur|j||jkrtd��|j|7_|S)z�add other to my value and return self

        >>> c = Counter(100)
        >>> c += 333
        >>> c == 433
        True
        Nzsorry, counter got too big)rr�
ValueError�r�otherrrr�__iadd__!szCounter.__iadd__r�returncCs
|j|kS)z�equality operator, compare other to my value()

        >>> c = Counter()
        >>> c == 0
        True
        >>> c += 10
        >>> c.incr()
        >>> c == 10   # fail this test on purpose
        True

        �rrrrr�__eq__/s
zCounter.__eq__cCs|�|�S)zXinequality operator

        >>> c = Counter()
        >>> c != 10
        True
        )rrrrr�__ne__=szCounter.__ne__cCs|�d�dS)a:increment my value by 1

        >>> from twisted.trial.test.mockdoctest import Counter
        >>> c = Counter(10, 11)
        >>> c.incr()
        >>> c.value() == 11
        True
        >>> c.incr()
        Traceback (most recent call last):
          File "<stdin>", line 1, in ?
          File "twisted/trial/test/mockdoctest.py", line 51, in incr
            self.__iadd__(1)
          File "twisted/trial/test/mockdoctest.py", line 39, in __iadd__
            raise ValueError, "sorry, counter got too big"
        ValueError: sorry, counter got too big
        �N)r
�rrrr�incrFszCounter.incrcCs|jS)zlreturn this counter's value

        >>> c = Counter(555)
        >>> c.value() == 555
        True
        rrrrr�valueYsz
Counter.valuecCsdS)zui will raise an unexpected exception...
        ... *CAUSE THAT'S THE KINDA GUY I AM*

              >>> 1/0
        Nrrrrr�unexpectedExceptionbszCounter.unexpectedException)rN)�__name__�
__module__�__qualname__�__doc__rr	r
�object�boolrrrrrrrrrrs
		rN)rrrrr�<module>s

Anon7 - 2022
AnonSec Team