HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/jeepney/io/tests/__pycache__/test_threading.cpython-310.pyc
o

���`�
�@s�ddlZddlmZmZmZddlmZmZddlm	Z	m
Z
ddlmZej
jedd�Zejd	d
��Zdd�Zed
ddd�Zdd�Zdd�Zdd�Zdd�Zdd�ZdS)�N)�new_method_call�MessageType�DBusAddress)�message_bus�	MatchRule)�open_dbus_router�Proxy�)�have_session_buszTests require DBus session bus)�reasonccs8�tdd��}|VWd�dS1swYdS)N�SESSION)�bus)r)�conn�r�A/usr/lib/python3/dist-packages/jeepney/io/tests/test_threading.py�routers�"�rcCs|j�d�sJ�dS)N�:)�unique_name�
startswith)rrrr�test_connectsrzorg.freedesktop.DBusz/org/freedesktop/DBuszorg.freedesktop.DBus.Peer)�bus_name�object_path�	interfacecCs<ttd�}|j|dd�}|jjtjksJ�|jdksJ�dS)N�Ping���timeoutr)r�bus_peer�send_and_get_reply�header�message_typer�
method_return�body)r�	ping_call�replyrrr�test_send_and_get_replys
r%cCsHtt|dd�}d}|�|�}|dvsJ�|j|dd�\}|dus"J�dS)Nrrz+io.gitlab.takluyver.jeepney.examples.Server>�r	���)�_timeoutT)rr�RequestName�NameHasOwner)r�proxy�name�res�	has_ownerrrr�
test_proxy!s
r1cCs�tt|�}d}tdtjtjdtjd�}|�d|�|�|�|�|��&}|�	|�\}|dks0J�|j
dd�}|j|d	|jfksAJ�Wd�dS1sLwYdS)
Nz7io.gitlab.takluyver.jeepney.tests.threading_test_filter�signal�NameOwnerChanged)�type�senderr�member�pathrr	g@r�)
rrrrrr�add_arg_condition�AddMatch�filterr+�getr"r)rr
r.�
match_rule�queuer/�
signal_msgrrr�test_filter*s"
�
"�r@cCs�t|d�}tddd��}|j|dd�}Wd�n1swY|jjtjus+J�|jd�d��}|�	�d	ks<J�Wd�dS1sGwYdS)
N�GetFDrT�r
�
enable_fdsrrrzw+�readme)
rrrrr rr!r"�to_file�read)�respond_with_fd�
getfd_callrr$�frrr�test_recv_fdBs
�"�rJcCsz|\}}t|dd|f�}tddd��}|j|dd�}Wd�n1s$wY|jjtjus2J�|jd|ks;J�dS)	N�ReadFD�hrTrBrrr)rrrrr rr!r")�temp_file_and_contents�read_from_fd�	temp_file�data�readfd_callrr$rrr�test_send_fdLs�rR)�pytest�jeepneyrrr�jeepney.bus_messagesrr�jeepney.io.threadingrr�utilsr
�mark�skipif�
pytestmark�fixturerrrr%r1r@rJrRrrrr�<module>s*�
�