| Server IP : 46.62.235.243 / Your IP : 216.73.216.254 Web Server : Apache/2.4.58 (Ubuntu) System : Linux Linkabili3Dicembre 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/twisted/test/__pycache__/ |
Upload File : |
�
oj
� �� � d Z ddlZddlZddlmZ ddlZdZddlm Z ddl
mZmZ G d� d � Z
e j e
� G d
� de� Z G d� d
e� Zy# e$ r dZY �Jw xY w)z)
Tests for L{twisted.python.threadable}.
� N)�skipIfFT)�
threadable)�FailTest�SynchronousTestCasec � � e Zd ZdgZdZdZd� Zy)�
TestObject�aMethod���� c �� � t d� D ]g }| j | j c| _ | _ | j | j z | _ | j dk( r�TJ d| j fz � � y )N�
r zz == %d, not 0 as expected)�range�y�x�z)�self�is �>/usr/lib/python3/dist-packages/twisted/test/test_threadable.pyr zTestObject.aMethod sb � ��r�� I�A�!�V�V�T�V�V�N�D�F�D�F��V�V�d�f�f�_�D�F��6�6�Q�;�H� <����y� H�H�;� I� N)�__name__�
__module__�__qualname__�synchronizedr r r � r r r r s � ��;�L�
�A� �A�Ir r c �Z � e Zd Zd� Zd� Z eed� d� � Z eed� d� � Zd� Z y)�SynchronizationTestsc � � | j t j t j � � t j d� y)z�
Reduce the CPython check interval so that thread switches happen much
more often, hopefully exercising more possible race conditions. Also,
delay actual test startup until the reactor has been started.
gH�����z>N)�
addCleanup�sys�setswitchinterval�getswitchinterval�r s r �setUpzSynchronizationTests.setUp) s/ � �
����-�-�s�/D�/D�/F�G����i�(r c �X � | j dt j j � y)zk
The name of a synchronized method is inaffected by the synchronization
decorator.
r N)�assertEqualr r r r"