| Server IP : 65.1.209.187 / Your IP : 216.73.216.144 Web Server : nginx/1.24.0 System : Linux ip-172-31-5-206 6.14.0-1015-aws #15~24.04.1-Ubuntu SMP Tue Sep 23 22:44:48 UTC 2025 x86_64 User : ( 1001) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/twisted/trial/test/__pycache__/ |
Upload File : |
�
oju � � � G d � d� Z y)c �T � e Zd ZdZdZd
d�Zd� Zdedefd�Z dedefd �Z
d
� Zd� Zd� Z
y)�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
� Nc � � || _ || _ y )N)�_count�maxval)�self�initialValuer s �@/usr/lib/python3/dist-packages/twisted/trial/test/mockdoctest.py�__init__zCounter.__init__ s � �"������ c � � | j �'| j |z | j kD rt d� �| xj |z
c_ | S )z�add other to my value and return self
>>> c = Counter(100)
>>> c += 333
>>> c == 433
True
zsorry, counter got too big)r r �
ValueError�r �others r
�__iadd__zCounter.__iadd__! sA � � �;�;�"����u�)<����(K��9�:�:��K�K�5� �K��r r �returnc � � | j |k( S )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
�r r s r
�__eq__zCounter.__eq__/ s � � �{�{�e�#�#r c �&