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__/conftest.cpython-310.pyc
o

���`�
�@s�ddlmZddlZddlZddlmZmZmZmZm	Z	m
Z
ddlmZm
Z
mZe��dd��Ze��dd��Ze��d	d
��ZdS)�)�
TemporaryFileN)�DBusAddress�HeaderFields�message_bus�MessageType�	new_error�new_method_return)�open_dbus_connection�
DBusRouter�Proxyc	#��d}t|dd�}tddd��?�t���}tt|��|�\}Wd�n1s(wY|dks3J��fdd	�}tj|dd
�}|��|VWd�n1sQwY|�	�dS)Nz1io.gitlab.takluyver.jeepney.tests.respond_with_fd�/��bus_name�object_path�SESSIONT��bus�
enable_fds�cs�	���}|jjtjurJ|jjtjdkrBtd�� }|�	d�|�
d�t|d|f�}��|�	Wd�dS1s<wYn��t
|d��q)NT�GetFDzw+�readmer�h�NoMethod)�receive�header�message_typer�method_call�fieldsr�memberr�write�seekr�sendr)�msg�tf�rep��conn��;/usr/lib/python3/dist-packages/jeepney/io/tests/conftest.py�_reply_onces



"��z$respond_with_fd.<locals>._reply_once��target�daemon�
rr	r
rr�RequestName�	threading�Thread�start�join��name�addr�router�statusr*�reply_threadr(r&r)�respond_with_fds�
��r:c	#r)Nz.io.gitlab.takluyver.jeepney.tests.read_from_fdr
rrTrrcs�	���}|jjtjurJ|jjtjdkrB|jd�	d��}|�
d�|��}Wd�n1s1wY��t
|d|f��dS��t|d��q)NT�ReadFDr�rb�ayr)rrrrrrrr�body�to_filer!�readr"rr)r#�f�br&r(r)r*5s

��z!read_from_fd.<locals>._reply_oncer+r.r4r(r&r)�read_from_fd+s�
�
�rCccsZ�d}td��}|�|�|��|�d�||fVWd�dS1s&wYdS)Nsabc123zw+br)rr �flushr!)�datar$r(r(r)�temp_file_and_contentsIs�


"�rF)�tempfilerr0�pytest�jeepneyrrrrrr�jeepney.io.threadingr	r
r�fixturer:rCrFr(r(r(r)�<module>s