| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/asgiref/__pycache__/ |
Upload File : |
�
"z�c/ � �H � d dl Z d dlZddlmZ ddlmZ G d� d� � ZdS )� N� )�guarantee_single_callable)�timeoutc �D � e Zd ZdZd� Zdd�Zdd�Zd� Zd� Zdd �Z dd�Z
d
S )�ApplicationCommunicatorz}
Runs an ASGI application in a test mode, allowing sending of
messages to it and retrieval of messages it sends.
c � � t |� � | _ || _ t j � � | _ t j � � | _ t j | � || j j | j j � � � � | _
d S �N)r �application�scope�asyncio�Queue�input_queue�output_queue�
ensure_future�get�put�future)�selfr
r s �1/usr/lib/python3/dist-packages/asgiref/testing.py�__init__z ApplicationCommunicator.__init__ sn � �4�[�A�A�����
�"�=�?�?���#�M�O�O����+����U�D�$4�$8�$�:K�:O�P�P�
�
����� r c � �^ K � t |� � 4 �d{V �� | j � d{V �� | j � � � n# t j $ r Y nw xY wddd� � �d{V �� n# 1 �d{V ��swxY w Y | j � � � s?| j � � � | j � d{V �� dS # t j $ r Y dS w xY wdS # | j � � � s=| j � � � | j � d{V �� w # t j $ r Y w w xY ww xY w)zV
Waits for the application to stop itself and returns any exceptions.
N)�
async_timeoutr �resultr �CancelledError�done�cancel)r r s r �waitzApplicationCommunicator.wait s � � � �
�$�W�-�-�
�
�
�
�
�
�
�
���+�%�%�%�%�%�%�%��K�&�&�(�(�(�(���-� � � ��D�����
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
� �;�#�#�%�%�
���"�"�$�$�$���+�%�%�%�%�%�%�%�%�%���-� � � ��D�D�����
�
��4�;�#�#�%�%�
���"�"�$�$�$���+�%�%�%�%�%�%�%�%���-� � � ��D�����
���s� �C �A)�&A�A)�A�A)�A�A)�C �)
A3�3C �6A3�7C �-
B<