zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
U
Z±diã@sˆddlZddlZddlZddlZddlmZmZddlmZe    edƒsRej
  d¡Z dd„Z ej
 dd    d
g¡d d „ƒZd d„Zdd„ZdS)éN)Úopen_unix_socketÚPath)Úclose_on_errorÚAF_UNIXzNeeds unix socket supportc
CslGdd„dƒ}t|ƒƒ}W5QRX|jr.t‚t t¡ t|ƒƒ
}t‚W5QRXW5QRX|jsht‚dS)Nc@seZdZdZdd„ZdS)z$test_close_on_error.<locals>.CloseMeFcSs
d|_dS)NT)Úclosed)Úself©rúad:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\trio/tests/test_highlevel_open_unix_stream.pyÚclosesz*test_close_on_error.<locals>.CloseMe.closeN)Ú__name__Ú
__module__Ú __qualname__rr
rrrr    ÚCloseMesr)rrÚAssertionErrorÚpytestÚraisesÚ RuntimeError)rÚcrrr    Útest_close_on_errors 
 
  rÚfilenameég@c    Ãs(t t¡t|ƒIdHW5QRXdS©N)rrÚ    TypeErrorr)rrrr    Ú test_open_with_bad_filename_types rc    Ãs0t ¡}t t¡t|ƒIdHW5QRXdSr)ÚtempfileÚmktemprrÚFileNotFoundErrorr)Únamerrr    Útest_open_bad_socket%s rc ÃsôttfD]æ}t ¡}t tjtj¡}|À| |¡z¢| 
d¡t ||ƒƒIdH}|4IdHšj|  ¡\}}|N|  d¡IdH| d¡dks”t‚| d¡| d¡IdH}|dksºt‚W5QRXW5QIdHRXW5t     |¡XW5QRXqdS)Néstestisresponse)rÚstrrrÚsocketrÚ SOCK_STREAMÚbindÚosÚunlinkÚlistenrÚacceptZsend_allÚrecvrÚsendallZ receive_some)Z    name_typerZ    serv_sockZ unix_socketÚclientÚ_Zreceivedrrr    Útest_open_unix_socket-s" 
 
 
*r,)r$r!rrZtriorrZ trio._highlevel_open_unix_streamrÚhasattrÚmarkÚskipZ
pytestmarkrZ parametrizerrr,rrrr    Ú<module>s